Automatic sorting system and method for plastic products
Through intelligent detection technology based on machine vision, the image on the plastic product production assembly line is used to detect shapes and colors, and feature vectors are generated to automatically eliminate unqualified products, solving the problems of low efficiency and high cost in traditional manual sorting, and achieving high efficiency, Accurate plastic product sorting and quality control.
Patent Information
- Application Number
- CN202411052076.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional plastic manufacturing industry relies on manual sorting, which leads to high labor consumption, low efficiency and increased costs, making it difficult to ensure the sorting quality and efficiency of plastic products.
Using intelligent detection technology based on machine vision, the shape, size and color are detected through the images taken on the plastic product production assembly line, and the detection feature vector is generated to determine whether the nozzle is turned on to remove unqualified products, so as to realize automatic sorting.
It realizes accurate and qualified classification and rapid removal of plastic products, improves sorting efficiency and quality control, reduces labor costs, and optimizes the economic benefits of the enterprise.
Smart Images

Figure CN119158805A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent sorting, and more specifically, to an automatic sorting system and method for plastic products. Background Art
[0002] In the actual production process of plastic products, except for large quantities of similar products that use dedicated molds and production lines, other small batches of plastic products with non-standard characteristics usually rely on general production lines. After these products are finished, they need to be uniformly sorted and quality tested.
[0003] The traditional plastic manufacturing industry relies on manual labor for sorting, but long-term assembly line work consumes a huge amount of labor. Even workers with rich sorting experience will make mistakes in a high-intensity working environment, making it difficult to guarantee the quality and efficiency of plastic product sorting. At the same time, the labor cost in modern society has increased, while the value and income of plastic products themselves are relatively low. The use of a large amount of labor in the sorting process will affect the overall income of the enterprise.
[0004] Therefore, an optimized automatic sorting solution for plastic products is needed. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present application provides a plastic product automatic sorting system and method.
[0006] According to one aspect of the present application, there is provided a plastic product automatic sorting system, comprising:
[0007] Plastic product image data acquisition module, used to obtain images of plastic products for target detection on the plastic product production line;
[0008] A plastic product image preprocessing module, used for performing image preprocessing on the image of the target detection plastic product to obtain a preprocessed plastic product detection image;
[0009] A plastic product feature encoding module, used for performing feature encoding on the preprocessed plastic product detection image to obtain a plastic product detection feature vector;
[0010] The plastic product automatic sorting module is used to determine whether to open the nozzle to remove unqualified plastic products based on the plastic product detection feature vector.
[0011] According to another aspect of the present application, there is provided a method for automatically sorting plastic products, comprising:
[0012] Acquire images of plastic products for target detection on a plastic product production line;
[0013] Performing image preprocessing on the target detection plastic product image to obtain a preprocessed plastic product detection image;
[0014] Performing feature encoding on the preprocessed plastic product detection image to obtain a plastic product detection feature vector;
[0015] Based on the plastic product detection feature vector, it is determined whether to open the nozzle to reject unqualified plastic products.
[0016] This application has significant technical effects due to the adoption of the above technical solutions:
[0017] The automatic sorting system and method of plastic products provided by the present application adopts intelligent detection technology based on machine vision, and detects the image of the target detected plastic products taken on the plastic product production line based on shape, size, and color to determine whether the target detected plastic products are qualified, and then decide whether to open the nozzle to remove unqualified plastic products. In this way, through accurate classification of qualified plastic products and rapid removal operations, effective sorting and quality control of plastic products can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0019] Figure 1 4 is a system block diagram of an automatic sorting system for plastic products according to an embodiment of the present application.
[0020] Figure 2 It is a block diagram of a plastic product feature coding module in an automatic plastic product sorting system according to an embodiment of the present application.
[0021] Figure 3 It is a block diagram of a plastic product color feature extraction unit in an automatic plastic product sorting system according to an embodiment of the present application.
[0022] Figure 4 It is a block diagram of a plastic product automatic sorting module in a plastic product automatic sorting system according to an embodiment of the present application.
[0023] Figure 5 The figure is a flow chart of a method for automatically sorting plastic products according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0025] In the production process of plastic products, although large quantities of the same product can be efficiently produced through dedicated molds and production lines, small batches of plastic products with special specifications and requirements usually require the use of multifunctional production lines. Once these products are produced, they need to go through a centralized sorting and quality inspection process.
[0026] At present, the traditional plastic manufacturing industry mainly relies on manual work in the sorting process. However, long-term assembly line operation is a great test for workers' physical and mental strength. Even experienced sorting workers will inevitably make mistakes in continuous high-intensity work, which directly affects the accuracy and efficiency of sorting. In addition, with the continuous rise in labor costs in modern society, and the relatively low value and profit of plastic products themselves, too much manual input in the sorting process will not only increase costs, but also affect the overall economic benefits of the enterprise. Therefore, an optimized automatic sorting solution for plastic products is expected.
[0027] In recent years, deep learning and neural networks have been widely used in computer vision, natural language processing, text signal processing and other fields. In addition, deep learning and neural networks have also shown a level close to or even beyond that of humans in image classification, object detection, semantic segmentation, text translation and other fields. The development of deep learning and neural networks provides new solutions and solutions for the automatic sorting of plastic products.
[0028] Figure 1 FIG. 1 is a system block diagram of an automatic plastic product sorting system according to an embodiment of the present application. Figure 1 As shown, in the automatic sorting system 100 for plastic products, it includes: a plastic product image data acquisition module 110, which is used to obtain images of target detected plastic products on the plastic product production line; a plastic product image preprocessing module 120, which is used to perform image preprocessing on the image of the target detected plastic product to obtain a preprocessed plastic product detection image; a plastic product feature encoding module 130, which is used to perform feature encoding on the preprocessed plastic product detection image to obtain a plastic product detection feature vector; a plastic product automatic sorting module 140, which is used to decide whether to open the nozzle to remove unqualified plastic products based on the plastic product detection feature vector.
[0029] Specifically, in the technical solution of the present application, an image of a plastic product for target detection on a plastic product production line is obtained. It should be understood that the image of the plastic product for target detection contains color information of the plastic product. Color is one of the important indicators of the appearance quality of plastic products. Color consistency, uniformity, etc. are all key factors in judging whether the product is qualified. The shape of the plastic product is also an important basis for judging its qualification, mainly including whether the shape is regular, whether there is deformation, whether the size meets the requirements, etc. The plastic product for target detection obtained by shooting will also contain defect information of the plastic product, such as scratches, bubbles, black spots, impurities, etc. These defects will directly affect the quality and usability of the product, and also need to be discovered and eliminated in time through image detection.
[0030] Environmental conditions on the production line (such as lighting changes, shadows, noise, etc.) can lead to poor quality of the acquired plastic product images, which can affect the accuracy of qualified plastic product recognition. In order to improve the quality of the original image and make the image clearer, thereby improving the accuracy of subsequent processing, the technical solution of this application requires preprocessing the image of the target detected plastic product to obtain a preprocessed plastic product detection image. Through preprocessing, useful information in the original image can be enhanced, thereby providing higher quality input for subsequent steps.
[0031] In an embodiment of the present application, a possible implementation method for preprocessing the image of the target detected plastic product to obtain a preprocessed plastic product detection image may be: the original plastic product image may be processed using a Gaussian filtering denoising method, wherein the Gaussian filter is suitable for removing Gaussian noise, and it is achieved by calculating the weighted average of the pixels in its neighborhood for each pixel point in the image.
[0032] Figure 2 FIG. 1 is a block diagram of a plastic product feature encoding module in a plastic product automatic sorting system according to an embodiment of the present application. Figure 2As shown, the plastic product feature encoding module 130 includes: a plastic product color feature extraction unit 131, which is used to extract color features from the preprocessed plastic product detection image to obtain a plastic product enhanced color feature image; a plastic product color feature dimension reduction unit 132, which is used to pool the various feature matrices along the channel dimension of the plastic product enhanced color feature image to obtain a plastic product enhanced color feature vector; a plastic product contour feature extraction unit 133, which is used to extract contour features from the preprocessed plastic product detection image to obtain a plastic product contour feature image; a plastic product contour feature dimension reduction unit 134, which is used to pool the various feature matrices along the channel dimension of the plastic product contour feature image to obtain a plastic product contour feature vector; a plastic product contour feature optimization unit 135, which is used to perform reverse optimization perception based on multidimensional relationship analysis between features on the plastic product contour feature vector based on the plastic product enhanced color feature vector to obtain an optimized plastic product contour feature vector; a feature fusion unit 136, which is used to fuse the plastic product enhanced color feature vector and the optimized plastic product contour feature vector to obtain the plastic product detection feature vector.
[0033] Figure 3 FIG. 1 is a block diagram of a plastic product color feature extraction unit in a plastic product automatic sorting system according to an embodiment of the present application. Figure 3 As shown, the plastic product color feature extraction unit 131 includes: a multi-channel plastic product detection image extraction subunit 1311, which is used to extract an R channel plastic product detection image, a G channel plastic product detection image and a B channel plastic product detection image from the preprocessed plastic product detection image; a multi-channel plastic product color feature extraction subunit 1312, which is used to pass the R channel plastic product detection image, the G channel plastic product detection image and the B channel plastic product detection image through a plastic product color feature encoder to obtain an R channel plastic product feature matrix, a G channel plastic product feature matrix and a B channel plastic product feature matrix respectively; a multi-channel color feature integration subunit 1313, which is used to aggregate the R channel plastic product feature matrix, the G channel plastic product feature matrix and the B channel plastic product feature matrix along the channel dimension to obtain a plastic product color feature image; a plastic product color feature enhancement subunit 1314, which is used to pass the plastic product color feature image through a plastic product color feature enhancer based on a channel attention mechanism to obtain the plastic product enhanced color feature image.
[0034] In image processing, color is one of the most intuitive and easily distinguishable features. The color difference of plastic products is often reflected in the brightness difference in different color channels (R, G, B). In order to analyze the color characteristics of plastic products more carefully, the original image needs to be decomposed into three single-channel images of R, G, and B. The image of each channel only contains the information of the color channel, which can simplify the complexity of data processing, that is, extract the R channel plastic product detection image, the G channel plastic product detection image, and the B channel plastic product detection image from the pre-processed plastic product detection image. It should be understood that plastic products may have similar color appearances, but there may be significant differences in certain color channels. For example, a certain plastic may have a higher brightness in the red channel and a lower brightness in the green channel. By analyzing these channels separately, these subtle color feature differences can be extracted more accurately. Specifically, in an implementable embodiment of the present application, the split function in OpenCV (open source computer vision library) can be used to realize the color single-channel image extraction of the original image.
[0035] Considering that the data dimension of the original color channel plastic product detection image is high and the amount of information is large, in order to extract the color features of the plastic product from the original product detection image, the R channel plastic product detection image, the G channel plastic product detection image and the B channel plastic product detection image need to be respectively passed through the plastic product color feature encoder to obtain the R channel plastic product feature matrix, the G channel plastic product feature matrix and the B channel plastic product feature matrix. Through the processing of the plastic product color feature encoder, the color features of the plastic products contained in each color channel can be captured, and these color features are an important basis for identifying whether the plastic products are qualified. In this application, the plastic product color feature encoder is a convolutional neural network model using a two-dimensional convolution kernel. Those of ordinary skill in the art should understand that the convolutional neural network model can automatically extract complex feature representations from the input image by stacking multiple convolutional layers, activation layers, pooling layers and other structures. The two-dimensional convolution kernel of CNN is suitable for processing image data because it can capture local connection features in the input image through the mechanism of local receptive field, which helps to extract local color features of the image.
[0036] Considering that the process of the plastic product color feature encoder processing the R channel plastic product detection image, the G channel plastic product detection image and the B channel plastic product detection image is the same, therefore, in this application, the processing of the R channel plastic product detection image is used as an example for explanation. In an embodiment of the present application, a possible implementation method of passing the R channel plastic product detection image through the plastic product color feature encoder to obtain the R channel plastic product feature matrix can be: using each layer of the plastic product color feature encoder to perform convolution processing based on a two-dimensional convolution kernel on the input data in the forward transfer of the layer; using the convolution units of each layer of the plastic product color feature encoder to perform pooling processing on the convolution feature map along the channel dimension to obtain a pooling feature map; using the activation units of each layer of the plastic product color feature encoder to perform nonlinear activation on the feature values of each position in the pooling feature map to obtain an activation feature map; wherein the output of the last layer of the plastic product color feature encoder is the R channel plastic product feature matrix.
[0037] The three color channels of RGB together constitute all the color information of the color image. The color feature map of each channel obtained by processing the single-color channel plastic product detection image data separately only contains the feature information on that color channel. In order to completely retain all the color features in the original plastic product detection image, it is necessary to aggregate the R channel plastic product feature matrix, the G channel plastic product feature matrix and the B channel plastic product feature matrix along the channel dimension to obtain the plastic product color feature map. Moreover, the feature matrices of different color channels will contain different information. For example, some color features may be obvious in the R channel, but relatively weak in the G or B channel; and vice versa. Aggregating these feature matrices can achieve complementarity between features, making the final plastic product color feature map more comprehensive and accurate.
[0038] Although the feature map after multi-color channel aggregation contains rich color information, not all features on the channels are equally important to the recognition task. In order to make the model pay more attention to those features that contribute more to the recognition task, it is necessary to pass the plastic product color feature map through a plastic product color feature enhancer based on a channel attention mechanism to obtain a plastic product enhanced color feature map. The plastic product color feature enhancer based on the channel attention mechanism in this application is a convolutional neural network model using a channel attention mechanism. The channel attention mechanism is a mechanism that focuses on the importance allocation of feature map channels in a convolutional neural network. Its main purpose is to emphasize the channels that contribute most to the task and suppress irrelevant or redundant channels by assigning different weights to each channel. Through the channel attention mechanism, the model can pay more attention to those color features that contribute more to the recognition task, making the plastic product color feature representation more prominent and effective. Because the feature representation is more prominent and effective, the model can more accurately capture key color features when identifying plastic products, thereby improving the accuracy and reliability of recognition.
[0039] In an embodiment of the present application, a possible implementation method of passing the plastic product color feature map through a plastic product color feature enhancer based on a channel attention mechanism to obtain a plastic product enhanced color feature map may be: each layer of the plastic product color feature enhancer based on the channel attention mechanism performs the following steps on the input data in the forward pass of the layer: convolution processing on the input data based on a two-dimensional convolution kernel to generate a convolution feature map; pooling processing on the convolution feature map to generate a pooling feature map; activation processing on the pooling feature map to generate an activation feature map; calculating the quotient of the eigenvalue mean of the feature matrix corresponding to each channel in the activation feature map and the sum of the eigenvalue means of the feature matrices corresponding to all channels as the weighting coefficient of the feature matrix corresponding to each channel; and weighting the feature matrix of each channel with the weighting coefficient of each channel in the activation feature map to generate a channel attention feature map; wherein the output of the last layer of the plastic product color feature enhancer based on the channel attention mechanism is the plastic product enhanced color feature map.
[0040] Taking into account that the enhanced color feature map of plastic products has a high dimension, which will increase the complexity of subsequent calculations, it is necessary to perform dimensionality reduction operations on the feature map, that is, to pool the feature matrices of the enhanced color feature map of plastic products along the channel dimension to obtain the enhanced color feature vector of the plastic product. Through pooling, the three-dimensional feature representation can be converted into a one-dimensional feature representation, which is conducive to improving calculation efficiency. In addition, the key color features of plastic products can be retained during the pooling process, and will not affect the subsequent qualified classification of plastic products.
[0041] The qualification standards of many plastic products include specific shape requirements. By extracting the contour features of plastic products, the shape of the product can be accurately identified, and then used to determine whether the plastic product is qualified. Therefore, in the technical solution of this application, it is necessary to pass the pre-processed plastic product detection image through a plastic product contour feature encoder to obtain a plastic product contour feature image. And when there are some defects such as cracks and gaps in the plastic product, it can be manifested as discontinuity and abnormality of the contour of the plastic product, so that these defects can be more easily detected. In this application, the plastic product contour feature encoder is a convolutional neural network model using convolution kernels of different sizes, wherein the size of the first convolution kernel is larger than the size of the second convolution kernel. Using convolution kernels of different sizes can capture feature information of different scales in the plastic product detection image. The first convolution kernel is larger in size and can capture more global and coarser features, such as the overall shape of the plastic product; while the second convolution kernel is smaller in size and can capture more local and finer features, such as the edge details of the plastic product. This multi-scale feature extraction method helps to more comprehensively describe the contour features of the product. Through layer-by-layer convolution, the contour feature information of the plastic product is gradually abstracted and hierarchical in the network. Specifically, the preliminary features extracted by the first convolutional layer provide richer input information for the second convolutional layer, enabling the second convolutional layer to further extract features at a finer scale. This hierarchical feature extraction method helps to improve the model's ability to recognize complex contour features.
[0042] In an embodiment of the present application, a possible implementation method of passing the preprocessed plastic product detection image through a plastic product contour feature encoder to obtain a plastic product contour feature map may be: using each layer of the plastic product contour feature encoder to respectively perform the following on the input data in the forward pass of the layer: using a first convolution kernel to perform convolution processing on the input data to obtain a first convolution feature map; using a second convolution kernel to perform convolution processing on the first convolution feature map to obtain a second convolution feature map, wherein the size of the first convolution kernel is larger than the size of the second convolution kernel; performing pooling processing on the second convolution feature map to obtain a pooled feature map; and, performing activation processing on the pooled feature map to obtain an activated feature map; wherein the output of the last layer of the plastic product contour feature encoder is the plastic product contour feature map, the input of the first layer of the plastic product contour feature encoder is the preprocessed plastic product detection image, the size of the first convolution kernel is 5×5, and the size of the second convolution kernel is 3×3.
[0043] Similarly, in order to maintain a high computing performance of the model so that unqualified plastic products can be quickly screened out on the production line, the technical solution of this application needs to pool the plastic product contour feature map along the channel dimension to obtain the plastic product contour feature vector. Through the pooling operation, the key contour features of the plastic product can be retained and the redundant information in the original feature map can be removed.
[0044] In particular, in the technical solution of the present application, it is considered that the contour feature vector mainly captures the shape and edge information of the plastic product, while the enhanced color feature vector focuses on the color information. These two feature types reflect the different properties of plastic products and may differ in feature expression. The contour feature encoder and the color feature encoder may use different algorithms or models to extract features, which may lead to differences in the information captured in the feature vector. During the aggregation and pooling process, the aggregation methods of different feature matrices may have different effects on the final feature vector, which may affect the consistency of the contour feature vector and the color feature vector when fused. The color feature enhancer based on the channel attention mechanism may focus more on the extraction and enhancement of color features, while the contour feature map may not have undergone similar enhancement processing, which may lead to insufficient weight or importance of the contour feature vector when fused. When fusing the contour feature vector and the color feature vector, if the fusion strategy is not sophisticated or well considered, it may not be possible to fully utilize the information in the two feature vectors, resulting in the lack of posterior-prior causal association. In order to solve this problem, in the technical solution of the present application, based on the plastic product enhanced color feature vector, the plastic product contour feature vector is subjected to reverse optimization perception based on multi-dimensional relationship analysis between features to obtain an optimized plastic product contour feature vector.
[0045] Specifically, in an embodiment of the present application, based on the plastic product enhanced color feature vector, the plastic product contour feature vector is subjected to reverse optimization perception based on multidimensional relationship analysis between features to obtain an optimized plastic product contour feature vector, including: calculating the positional difference between the plastic product contour feature vector and the plastic product enhanced color feature vector to obtain a first viewpoint metric representation vector; calculating the positional point multiplication between the plastic product contour feature vector and the plastic product enhanced color feature vector to obtain a second viewpoint metric representation vector; calculating the positional summation between the plastic product contour feature vector and the plastic product enhanced color feature vector to obtain a third viewpoint metric representation vector. A viewpoint metric representation vector; calculating the gradient amplitude of each position in the first viewpoint metric representation vector, the second viewpoint metric representation vector and the third viewpoint metric representation vector to obtain a first viewpoint metric perception vector, a second viewpoint metric perception vector and a third viewpoint metric perception vector; inputting the first viewpoint metric perception vector, the second viewpoint metric perception vector and the third viewpoint metric perception vector into a backward machine learning inverse multi-viewpoint perception optimization module to obtain a reverse multi-viewpoint perception optimization representation vector; calculating the positional point multiplication between the reverse multi-viewpoint perception optimization representation vector and the plastic product contour feature vector to obtain the optimized plastic product contour feature vector.
[0046] More specifically, in the embodiment of the present application, the backward machine learning reverse multi-view perception optimization module is expressed by the formula:
[0047]
[0048] in, and represents the eigenvalues of the i-th position of the first viewpoint metric perception vector, the second viewpoint metric perception vector and the third viewpoint metric perception vector, respectively, and μ represents the three eigenvalues of the corresponding positions in the first viewpoint metric perception vector, the second viewpoint metric perception vector and the third viewpoint metric perception vector , σ is the standard deviation of the three eigenvalues at corresponding positions in the first viewpoint metric perception vector, the second viewpoint metric perception vector and the third viewpoint metric perception vector, represents the maximum value of the three eigenvalues of the corresponding positions in the first viewpoint metric perception vector, the second viewpoint metric perception vector and the third viewpoint metric perception vector, ReLU represents a linear rectification function, softmax represents a normalized exponential function, and v ri represents the eigenvalue of the i-th position of the inverse multi-view perceptual optimization representation vector, and exp(·) represents an exponential operation with the natural constant e as the base.
[0049] Specifically, in the technical solution of the present application, based on the plastic product enhanced color feature vector, the plastic product contour feature vector is subjected to reverse optimization perception optimization based on the multi-dimensional relationship analysis between features, and the process includes firstly calculating the position difference, dot product and sum between the plastic product contour feature vector and the plastic product enhanced color feature vector through multi-view analysis (Multi-View Analysis) to obtain three viewpoint metric representation vectors, and quantifying the relationship between features from different angles. Then, the gradient amplitude of each position in these viewpoint metric representation vectors is calculated through backward error perception (Backward Error Perception) to identify key change points to provide a basis for feature optimization.
[0050] Then, the first viewpoint metric perception vector, the second viewpoint metric perception vector and the third viewpoint metric perception vector are input into the backward machine learning reverse multi-viewpoint perception optimization module, wherein the backward machine learning reverse multi-viewpoint perception optimization module captures the significant comprehensive ability factor of the feature importance perception (Feature Importance Perception) of the feature sub-dimension distribution of the corresponding position in the first to third viewpoint metric perception vectors by adopting a squeeze-incentive mechanism composed of -functions. Then, the position point multiplication between the reverse multi-viewpoint perception optimization representation vector and the plastic product contour feature vector is calculated to perform backward optimization perception (Backward Optimization Perception) on the plastic product contour feature vector to adjust the plastic product contour feature vector so as to better associate it with the plastic product enhanced color feature vector, thereby enhancing the causal relationship between the plastic product contour feature vector and the plastic product enhanced color feature vector.
[0051] Color features and contour features are two important aspects of the appearance attributes of plastic products. Color features reflect the color information of products, such as color uniformity, color difference, etc., while contour features describe geometric information such as shape and size of products. In order to integrate the color information and geometric information of products and form a more comprehensive product detection feature vector, the plastic product enhanced color feature vector and the optimized plastic product contour feature vector can be fused in the technical solution of the present application to obtain a plastic product detection feature vector. It should be understood that when color features or contour features are used alone to identify unqualified plastic products, they may be limited by certain factors. For example, color features may be affected by factors such as illumination changes in the image; while contour features may be affected by factors such as product deformation and stain occlusion in the image. By fusing the plastic product enhanced color feature vector and the optimized plastic product contour feature vector, their respective deficiencies can be complemented to improve the accuracy and robustness of recognition. In practical applications, the detection requirements of plastic products may be varied. Some products may pay more attention to color accuracy, while some products may pay more attention to shape integrity. By fusing color features and contour features, the weights of the two features in the detection feature vector can be flexibly adjusted to meet different detection requirements.
[0052] In an embodiment of the present application, a possible implementation method of fusing the plastic product enhanced color feature vector and the optimized plastic product contour feature vector to obtain the plastic product detection feature vector may be: fusing the plastic product enhanced color feature vector and the optimized plastic product contour feature vector in the following manner to obtain the plastic product detection feature vector; wherein the fusion formula is:
[0053] V1=αV a ⊕βV b
[0054] Among them, V1 is the plastic product detection feature vector, V a Enhance the color feature vector for the plastic product, V b is the optimized plastic product contour feature vector, “⊕” represents the addition of the elements at corresponding positions of the plastic product enhanced color feature vector and the optimized plastic product contour feature vector, and α and β are weighted parameters for controlling the balance between the plastic product enhanced color feature vector and the optimized plastic product contour feature vector in the plastic product detection feature vector.
[0055] Figure 4 FIG. 1 is a block diagram of a plastic product automatic sorting module in a plastic product automatic sorting system according to an embodiment of the present application. Figure 4As shown, the plastic product automatic sorting module 140 includes: a plastic product qualified result generation unit 141, which is used to pass the plastic product detection feature vector through a qualified product classifier to obtain a classification result, and the classification result is used to indicate whether the target detected plastic product is qualified; an unqualified product rejection unit 142, which is used to decide whether to open the nozzle to reject unqualified plastic products based on the classification result.
[0056] Finally, the plastic product detection feature vector is passed through the qualified product classifier to obtain a classification result. The classification result is used to indicate whether the target detected plastic product is qualified, and based on the classification result, it is decided whether to open the nozzle to remove unqualified plastic products. Although the plastic product detection feature vector contains rich information such as color and shape, this information is represented in a high-dimensional feature space and does not directly correspond to the qualified detection result of the plastic product. In order to convert the feature information in these high-dimensional spaces into understandable and meaningful classification results, it is necessary to pass the plastic product detection feature vector through the qualified product classifier. The qualified product classifier is built based on a machine learning algorithm. After optimization and adjustment of a large amount of training data, it can accurately distinguish qualified products from unqualified products. If the classification result is "qualified", no rejection operation is performed, and the plastic product will be regarded as a qualified product to continue the subsequent process; if the classification result is "unqualified", the system will immediately send a signal to the rejection device. After receiving the rejection signal, the nozzle will quickly open and release a high-speed airflow to push it away from the conveyor belt to the designated rejection area. In this way, automatic, fast and efficient plastic product identification is achieved, and effective sorting and quality control of plastic products are completed.
[0057] In summary, the automatic sorting system 100 for plastic products based on the embodiment of the present application is explained, which adopts intelligent detection technology based on machine vision, and detects the image of the target detected plastic product taken on the plastic product production line based on shape, size, and color to determine whether the target detected plastic product is qualified, and then decides whether to open the nozzle to remove unqualified plastic products. In this way, through accurate classification of qualified plastic products and rapid rejection operations, effective sorting and quality control of plastic products can be achieved.
[0058] As described above, the automatic sorting system 100 for plastic products according to the embodiment of the present application can be implemented in various terminal devices, such as a server for automatic sorting of plastic products. In one example, the automatic sorting system 100 for plastic products according to the embodiment of the present application can be integrated into the terminal device as a software module and / or a hardware module. For example, the automatic sorting system 100 for plastic products can be a software module in the operating system of the terminal device, or can be an application developed for the terminal device; of course, the automatic sorting system 100 for plastic products can also be one of the many hardware modules of the terminal device.
[0059] Alternatively, in another example, the automatic plastic product sorting system 100 and the terminal device may also be separate devices, and the automatic plastic product sorting system 100 may be connected to the terminal device via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.
[0060] Figure 5 FIG. 1 is a flow chart of a method for automatically sorting plastic products according to an embodiment of the present application. Figure 5 As shown, in the automatic sorting method of plastic products, the following steps are included: S110, acquiring an image of a target detected plastic product on a plastic product production line; S120, performing image preprocessing on the image of the target detected plastic product to obtain a preprocessed plastic product detection image; S130, performing feature encoding on the preprocessed plastic product detection image to obtain a plastic product detection feature vector; S140, based on the plastic product detection feature vector, determining whether to open the nozzle to remove unqualified plastic products.
[0061] Here, those skilled in the art will appreciate that the specific operations of each step in the above-mentioned automatic sorting method for plastic products have been described in detail above. Figures 1 to 4 The invention has been described in detail in the description of the automatic sorting system for plastic products, and therefore, its repeated description will be omitted.
[0062] In summary, the automatic sorting method of plastic products based on the embodiment of the present application is explained, which adopts intelligent detection technology based on machine vision, and detects the image of the target detected plastic product taken on the plastic product production line based on shape, size, and color to determine whether the target detected plastic product is qualified, and then decides whether to open the nozzle to remove unqualified plastic products. In this way, through accurate classification of qualified plastic products and rapid rejection operations, effective sorting and quality control of plastic products can be achieved.
Claims
1. An automatic sorting system for plastic products, characterized in that: include: Plastic product image data acquisition module, used to obtain images of plastic products for target detection on the plastic product production line; A plastic product image preprocessing module, used for performing image preprocessing on the image of the target detection plastic product to obtain a preprocessed plastic product detection image; A plastic product feature encoding module, used for performing feature encoding on the preprocessed plastic product detection image to obtain a plastic product detection feature vector; The plastic product automatic sorting module is used to determine whether to open the nozzle to remove unqualified plastic products based on the plastic product detection feature vector.
2. The automatic sorting system for plastic products according to claim 1, characterized in that: The plastic product feature coding module comprises: A plastic product color feature extraction unit, used for extracting color features from the pre-processed plastic product detection image to obtain a plastic product enhanced color feature image; A plastic product color feature dimensionality reduction unit, used for pooling the plastic product enhanced color feature map along the channel dimension of each feature matrix to obtain a plastic product enhanced color feature vector; A plastic product contour feature extraction unit, used for extracting contour features from the pre-processed plastic product detection image to obtain a plastic product contour feature image; A plastic product profile feature dimensionality reduction unit, used for pooling the plastic product profile feature map along the channel dimension of each feature matrix to obtain a plastic product profile feature vector; A plastic product contour feature optimization unit, configured to perform reverse optimization perception based on multi-dimensional relationship analysis between features on the plastic product contour feature vector based on the plastic product enhanced color feature vector to obtain an optimized plastic product contour feature vector; A feature fusion unit is used to fuse the plastic product enhanced color feature vector and the optimized plastic product contour feature vector to obtain the plastic product detection feature vector.
3. The automatic sorting system for plastic products according to claim 2, characterized in that: The plastic product color feature extraction unit comprises: A multi-channel plastic product detection image extraction subunit, used to extract an R channel plastic product detection image, a G channel plastic product detection image and a B channel plastic product detection image from the pre-processed plastic product detection image; A multi-channel plastic product color feature extraction subunit, used for respectively passing the R channel plastic product detection image, the G channel plastic product detection image and the B channel plastic product detection image through a plastic product color feature encoder to obtain an R channel plastic product feature matrix, a G channel plastic product feature matrix and a B channel plastic product feature matrix; A multi-channel color feature integration subunit, used for aggregating the R channel plastic product feature matrix, the G channel plastic product feature matrix and the B channel plastic product feature matrix along the channel dimension to obtain a plastic product color feature map; The plastic product color feature enhancement subunit is used to pass the plastic product color feature map through a plastic product color feature enhancer based on a channel attention mechanism to obtain the plastic product enhanced color feature map.
4. The automatic sorting system for plastic products according to claim 3 is characterized in that: The plastic product contour feature extraction unit is used to: pass the preprocessed plastic product detection image through a plastic product contour feature encoder to obtain the plastic product contour feature image.
5. The automatic sorting system for plastic products according to claim 4, characterized in that: The plastic product color feature encoder is a convolutional neural network model using a two-dimensional convolution kernel, and the plastic product color feature enhancer based on the channel attention mechanism is a convolutional neural network model using a channel attention mechanism.
6. The automatic sorting system for plastic products according to claim 5, characterized in that: The plastic product contour feature encoder is a convolutional neural network model using convolution kernels of different sizes, wherein the size of the first convolution kernel is larger than the size of the second convolution kernel.
7. The automatic sorting system for plastic products according to claim 6, characterized in that: The plastic product profile feature optimization unit is used to: Calculating a position difference between the plastic product contour feature vector and the plastic product enhanced color feature vector to obtain a first viewpoint metric representation vector; Calculate the position point multiplication between the plastic product contour feature vector and the plastic product enhanced color feature vector to obtain a second viewpoint metric representation vector; Calculating the positional sum of the plastic product contour feature vector and the plastic product enhanced color feature vector to obtain a third viewpoint metric representation vector; Calculating the gradient magnitude of each position in the first viewpoint metric representation vector, the second viewpoint metric representation vector, and the third viewpoint metric representation vector to obtain a first viewpoint metric perception vector, a second viewpoint metric perception vector, and a third viewpoint metric perception vector; Inputting the first viewpoint metric perception vector, the second viewpoint metric perception vector and the third viewpoint metric perception vector into a backward machine learning inverse multi-view perception optimization module to obtain a reverse multi-view perception optimization representation vector; The optimized plastic product contour feature vector is obtained by calculating the position point multiplication between the inverse multi-viewpoint perception optimization representation vector and the plastic product contour feature vector.
8. The automatic sorting system for plastic products according to claim 7, characterized in that: The automatic plastic product sorting module comprises: A plastic product qualified result generating unit, used for passing the plastic product detection feature vector through a qualified product classifier to obtain a classification result, wherein the classification result is used to indicate whether the target detected plastic product is qualified; The unqualified product rejection unit is used to determine whether to open the nozzle to reject the unqualified plastic products based on the classification result.
9. A method for automatically sorting plastic products, characterized in that: include: Acquire images of plastic products for target detection on a plastic product production line; Performing image preprocessing on the target detection plastic product image to obtain a preprocessed plastic product detection image; Performing feature encoding on the preprocessed plastic product detection image to obtain a plastic product detection feature vector; Based on the plastic product detection feature vector, it is determined whether to open the nozzle to reject unqualified plastic products.
10. The automatic sorting method for plastic products according to claim 9, characterized in that: Performing feature encoding on the preprocessed plastic product detection image to obtain a plastic product detection feature vector includes: Performing color feature extraction on the pre-processed plastic product detection image to obtain an enhanced color feature image of the plastic product; Pooling the plastic product enhanced color feature map with each feature matrix along the channel dimension to obtain a plastic product enhanced color feature vector; Extracting contour features from the pre-processed plastic product detection image to obtain a plastic product contour feature image; Pooling the plastic product contour feature map along the channel dimension of each feature matrix to obtain a plastic product contour feature vector; Based on the plastic product enhanced color feature vector, performing reverse optimization perception based on multi-dimensional relationship analysis between features on the plastic product contour feature vector to obtain an optimized plastic product contour feature vector; The plastic product enhanced color feature vector and the optimized plastic product contour feature vector are fused to obtain the plastic product detection feature vector.
