A carton classification method and device based on data processing
By setting target classification sets and image processing technology, the carton classification model is constructed and optimized, and the problem of low classification recognition rate during carton transmission is solved, and more accurate carton classification and corner detection accuracy is achieved.
Patent Information
- Application Number
- CN202410892460.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-04
AI Technical Summary
In the prior art, the classification recognition rate during carton transmission is low, making it difficult to accurately distinguish the appearance changes of cartons caused by wear or stains.
By setting the target classification set, the carton image data on the conveyor belt is collected in real time, the key image data is extracted using image processing methods, the carton classification model is constructed and optimized, the model performance is simulated in the classification environment, and the classification performance is evaluated when angle changes.
The classification recognition rate during carton transmission is improved, more accurate carton classification is achieved, and the accuracy problems under corner detection and placement angle changes are solved.
Smart Images

Figure CN118411576B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a carton classification method and device based on data processing. Background Art
[0002] With the rapid development of industrial automation technology, all links in the carton production and classification process have gradually been automated and intelligent. The application of automated production lines, robotics, and automated control systems has made the carton production process more efficient and accurate, and reduced labor costs. The existing carton classification control technology is developing in a more intelligent and automated direction. In addition, through high-resolution cameras and image processing technology, it is possible to quickly identify and classify features such as carton shape, color, and size. At the same time, through deep learning algorithms, a large amount of carton data can be learned and trained to achieve automatic recognition of carton types. This method not only improves the accuracy of classification, but also greatly improves the classification efficiency. However, traditional carton classification mainly relies on manual labor, which is inefficient and prone to errors. Especially in the face of large-scale and efficient carton classification needs, the limitations of manual classification are becoming more and more obvious. Therefore, it is particularly important to develop a more efficient and intelligent data processing carton classification method and device, which has also become an urgent need for the development of the automation industry.
[0003] The existing carton sorting system uses sensors to detect the position and angle of the cartons to be sorted, and uses image processing technology to capture and analyze the appearance features of the cartons to be sorted on the conveyor belt. It then compares the extracted shape, size, color and texture features with the preset classification criteria to achieve automatic classification of the cartons to be sorted.
[0004] For example, a data processing system for entity classification is announced in the invention patent with announcement number: CN116227495B, including: obtaining a target text and using a trained first neural network model to obtain a coding vector of the target text; using a trained second neural network model to infer the coding vector of the target text to obtain the coding vector of the target text; unifying the dimensions and concatenating the coding vectors of the coding vectors of the target text to obtain a corresponding target coding tensor; using a trained third neural network model to infer the target coding tensor to obtain a corresponding target text entity type.
[0005] For example, the text classification model training, classification method and system and data processing system announced by the invention patent with announcement number: CN113177119B include: determining the classification estimate value of the unlabeled samples based on the text classification model to be trained to obtain an estimated labeled sample set; obtaining the text and vector of the labeled sample set through the encoder to be trained, and obtaining a mixed labeled sample set in combination with the category identifier of the labeled samples; inputting the estimated labeled sample set and the mixed labeled sample set into a feedforward neural network, and adjusting the parameters of the encoder to be trained and the current feedforward neural network according to the loss value of the loss function, and obtaining a text classification model in combination with a preset number of training times.
[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems:
[0007] In the prior art, since the appearance of the cartons to be classified may change during transportation due to wear, stains and other factors, the recognition rate decreases and it is difficult to accurately distinguish them, there is a problem of low classification recognition rate during carton transmission. Summary of the invention
[0008] The embodiments of the present application solve the problem of low classification and recognition rate in the carton transmission process in the prior art by providing a carton classification method and device based on data processing, thereby improving the classification and recognition rate in the carton transmission process.
[0009] The embodiment of the present application provides a carton classification method based on data processing, comprising the following steps: S1, setting a target classification set according to a preset classification target of carton classification, and collecting image data of cartons to be classified on a conveyor belt in real time through sensors and marking them, wherein the target classification set is used to visualize the corresponding classification area set between the cartons to be classified and the preset classification target; S2, normalizing the collected image data using an image processing method and extracting key image data according to the principle of image recognition, wherein the key image data includes appearance information data and texture information data of the cartons to be classified; S3, constructing a carton classification model in combination with the extracted key image data and optimizing the model, wherein the carton classification model is used to automatically identify and classify input cartons to be classified by learning key image data, and the classification performance is used to numerically describe the classification performance of the carton classification model during the automatic classification process; S4, testing the optimized carton classification model in a simulated classification environment, and evaluating the performance of the carton classification model in processing changes in the placement angle of the cartons to be classified according to the test results. The simulated classification environment is used to simulate the movement and placement angle changes of the cartons to be classified on the conveyor belt.
[0010] Furthermore, the specific setting steps of the target classification set are: analyzing the physical characteristics and functional characteristics of the cartons to be classified to identify preset classification characteristics, and setting corresponding classification standards in combination with the classification feature data within a preset time period, the classification feature data including physical feature data and functional feature data; visually displaying the correspondence between the classification feature data and the preset classification features in the form of a classification tree in combination with the classification standard and the classification recognition index, and the classification recognition index is used to measure the degree of match between the classification feature data and the preset classification features; analyzing the results of the visualization and presenting the classification logic and classification areas of the cartons to be classified in charts, and setting the target classification set in combination with actual classification needs.
[0011] Furthermore, the specific steps for obtaining the classification identification index are as follows: extracting key information data from the classification feature data, and setting corresponding allocation weights according to the similarity matching degree and the classification dimension to obtain the classification identification index, wherein the key information data is used to describe the physical characteristic information and functional characteristic information of the classification feature data, and the similarity matching degree is used to measure the similarity between the classification feature data and the key information data, and the classification dimension is used to quantify the load-bearing capacity and pressure resistance of the cartons to be classified during the classification process to obtain the corresponding load-bearing capacity data and pressure resistance data, and the allocation weight is used to describe the influence of the physical characteristic data, the functional characteristic data, the load-bearing capacity data and the pressure resistance data on the classification identification index, and the allocation weight includes a first weight, a second weight, a third weight and a fourth weight; the classification identification index is calculated by the following formula:
[0012]
[0013] In the formula, y is the number of the carton to be classified, , Y is the total number of cartons to be classified, represents the classification identification index corresponding to the yth carton to be classified, e is a natural constant, Represents the preset physical feature data corresponding to the yth carton to be classified, Represents the physical feature data corresponding to the yth carton to be classified, Indicates the reference deviation of physical characteristic data, represents the first weight, Indicates the preset functional feature data corresponding to the yth carton to be classified, Represents the functional feature data corresponding to the yth carton to be classified, Indicates the reference deviation of the functional characteristic data, represents the second weight, Indicates the load-bearing capacity data corresponding to the yth carton to be classified, Indicates the reference data of load-bearing capacity. Indicates the reference deviation of the load-bearing capacity data. represents the third weight, Indicates the compression resistance data corresponding to the yth carton to be classified, Indicates the reference data of pressure resistance. Indicates the reference deviation of the pressure resistance data. Represents the fourth weight.
[0014] Furthermore, the specific steps of extracting the key image data include: encoding the collected image data and mapping it to the pixel position corresponding to the coordinate image; correcting the rotation angle deviation of the cartons to be classified during conveyor belt transportation, and detecting the main direction of the image data on the coordinate image and determining the rotation angle between it and the expected main direction; rotating the image data according to the determined rotation angle and using a rotation transformation matrix to obtain regular image data; using an edge detection method to extract the outline of the carton to be classified, and using a filter to filter the regular image data to determine the texture features of the carton to be classified; inputting the outline of the carton to be classified and the texture features of the carton to be classified into a grayscale co-occurrence matrix to extract the key image data.
[0015] Furthermore, the specific steps of constructing a carton classification model in combination with the extracted key image data include: obtaining a target classification set area based on a target classification set and in combination with actual classification requirements, and mapping the pixel points of the key image data in the grayscale co-occurrence matrix to a preset target classification set area based on an image correction threshold; converting the key image data into a model numerical form, and designing a model network architecture in combination with the data complexity of the key image data, wherein the data complexity represents the complexity of the key image data obtained by analyzing the degree of discreteness of the pixel points of the key image data in the preset target classification set area, and the model network architecture is used to regularize the model numerical form of the key image data to eliminate overfitting and underfitting of the model numerical form; constructing a carton classification model based on the designed model network architecture and in combination with the model architecture conformity coefficient, wherein the model architecture conformity coefficient is used to measure the degree of adaptation between the model network architecture and the carton classification model.
[0016] Furthermore, the model architecture conformity coefficient is obtained by the following method: constructing a classification benchmark model based on an image correction threshold and a classification recognition index and using key image data to perform model training on the constructed classification benchmark model, wherein the classification benchmark model is used to visualize the performance of simulated classification of cartons to be classified on a conveyor belt; evaluating the classification benchmark model according to preset evaluation indicators, and judging whether the performance of simulated classification of cartons to be classified meets the preset evaluation indicators based on the evaluation results; if so, obtaining the model architecture conformity coefficient based on data complexity and data similarity; otherwise, retraining the constructed classification benchmark model until the preset evaluation indicators are met, wherein the data similarity represents the degree of similarity of key image data obtained by analyzing the grayscale values of pixels of key image data in a preset target classification set area; the model architecture conformity coefficient is calculated by the following formula:
[0017]
[0018] In the formula, i is the number of times the model is trained. , M is the total number of model training times, It indicates the model architecture conformity coefficient corresponding to the i-th model training, e is a natural constant, represents the brightness of the key image data corresponding to the i-th model training, Indicates the reference brightness of key image data, Indicates the reference deviation of the brightness of key image data, represents the contrast of the key image data corresponding to the i-th model training, represents the reference contrast of key image data, represents the reference deviation of the contrast of key image data, represents the data complexity corresponding to the i-th model training, represents the data reference complexity, represents the data complexity reference deviation, represents the data similarity corresponding to the i-th model training, represents the data reference similarity, Represents the data similarity reference deviation.
[0019] Furthermore, the specific steps of the model optimization are: performing corner point detection on the placement angle of the cartons to be classified on the conveyor belt, and comparing the placement angle of the corner point detection with the preset standard angle in the target classification set area; generating integrated rotation information based on the comparison result and combined with the rotation compliance coefficient, and the rotation compliance coefficient is used to measure the degree of adaptation of the cartons to be classified to the target classification set area after the placement angle changes; and performing secondary training on the carton classification model in combination with the integrated rotation information to realize automatic classification when the placement angle of the cartons to be classified changes.
[0020] Furthermore, the rotation conformity coefficient is obtained by the following method: evaluating the result after secondary training of the carton classification model and obtaining confidence and confidence evaluation factor in combination with reference confidence, the confidence being used to measure the credibility that the carton to be classified belongs to the target classification area under the placement angle, and the confidence evaluation factor representing the influence of confidence on the placement angle during the classification process of the carton to be classified; obtaining corner point matching and angle difference value according to the result of corner point detection, the corner point matching being used to measure the degree of matching between the placement corner point position of the corner point detection and the expected corner point position in the target classification set area, and the angle difference being used to measure the degree of deviation between the placement angle of the corner point detection and the preset standard angle in the target classification set area; obtaining the rotation conformity coefficient in combination with the relative deviation of the corner point matching and the relative deviation of the angle difference value.
[0021] Furthermore, the specific steps of testing the optimized carton classification model in a simulated classification environment include: building a simulated classification environment according to the actual application scenario, and obtaining a test data set in combination with the classification performance of the carton classification model, wherein the test data set represents the image data of the cartons to be classified under a preset category and a preset placement angle; loading the optimized carton classification model into the simulated classification environment, and setting the test parameters of the batch sequence and the number of test rounds according to the actual test requirements, and evaluating the classification performance of the carton classification model in combination with the performance evaluation indicators; adjusting the test parameters according to the evaluation results and iteratively optimizing the carton classification model until the performance evaluation indicators are met.
[0022] The embodiment of the present application provides a carton classification device based on data processing, including: an image data acquisition module, a key image data extraction module, a model optimization module and a test evaluation module; wherein the image data acquisition module is used to set a target classification set according to a preset classification target of carton classification, and at the same time, collect image data of cartons to be classified on a conveyor belt in real time through a sensor and mark them, and the target classification set is used to visualize the corresponding classification area set between the cartons to be classified and the preset classification target; the key image data extraction module is used to use an image processing method to normalize the collected image data and extract key image data according to the image recognition principle, and the key image data includes the cartons to be classified The appearance information data and texture information data of the box; the model optimization module is used to construct a carton classification model in combination with the extracted key image data and perform model optimization, the carton classification model is used to automatically identify and classify the input cartons to be classified by learning the key image data, and the classification performance is used to numerically describe the classification performance of the carton classification model during the automatic classification process; the test evaluation module is used to test the optimized carton classification model in a simulated classification environment, and at the same time evaluate the performance of the carton classification model when processing the changes in the placement angle of the cartons to be classified based on the test results, and the simulated classification environment is used to simulate the movement of the cartons to be classified on the conveyor belt and the changes in the placement angle.
[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0024] 1. Set the target classification set through the preset classification target of carton classification, and collect the image data of the cartons to be classified on the conveyor belt in real time through the sensor and mark them, then extract the key image data according to the image recognition principle, build the carton classification model and optimize the model, finally test the optimized carton classification model in the simulated classification environment, and evaluate the performance of the carton classification model in the automatic classification process, so as to achieve a more accurate evaluation of the classification performance, and then realize the improvement of the classification recognition rate during the carton transmission process, which effectively solves the problem of low classification recognition rate during the carton transmission process in the prior art.
[0025] 2. The target classification set area is obtained through the target classification set and combined with the actual classification requirements. At the same time, the pixel points of the key image data in the grayscale co-occurrence matrix are mapped with the preset target classification set area in combination with the image correction threshold. Then the key image data is converted into the model numerical form, and the model network architecture is designed in combination with the data complexity of the key image data. Finally, the carton classification model is constructed according to the designed model network architecture and combined with the model architecture compliance coefficient, thereby realizing the accurate acquisition of the model architecture compliance coefficient, and then realizing a more accurate construction of the carton classification model.
[0026] 3. By performing corner point detection on the placement angle of the cartons to be classified on the conveyor belt, and comparing the placement angle of the corner point detection with the preset standard angle in the target classification set area, the integrated rotation information is generated according to the comparison result and combined with the rotation compliance coefficient. Finally, the carton classification model is retrained based on the integrated rotation information to realize automatic classification when the placement angle of the cartons to be classified changes, thereby improving the accuracy of corner point detection and achieving more accurate classification of the cartons to be classified. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A flow chart of a carton classification method based on data processing provided in an embodiment of the present application;
[0028] Figure 2 A flowchart for constructing a carton classification model provided in an embodiment of the present application;
[0029] Figure 3 A test flow chart of the carton classification model provided in the embodiment of the present application;
[0030] Figure 4 A schematic diagram of the structure of a carton classification device based on data processing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The embodiment of the present application solves the problem of low classification recognition rate in the process of carton transmission in the prior art by providing a carton classification method and device based on data processing. First, a target classification set is set according to a preset classification target of carton classification to visualize the corresponding classification area set between the carton to be classified and the preset classification target. At the same time, the image data of the carton to be classified on the conveyor belt is collected in real time by a sensor and marked. Then, the collected image data is normalized by an image processing method and the appearance information data and texture information data of the carton to be classified are extracted according to the image recognition principle. Then, the target classification set area is obtained according to the target classification set and combined with the actual classification requirements. Then, the appearance information data and the texture information data are converted into a model numerical form to design a model network architecture. At the same time, a carton classification model is constructed and optimized in combination with the designed model network architecture. Finally, the optimized carton classification model is tested in a simulated classification environment, and the movement and placement angle changes of the carton to be classified on the conveyor belt are monitored in real time. At the same time, the performance of the carton classification model in processing the placement angle changes of the carton to be classified is evaluated according to the test results, thereby improving the classification recognition rate in the process of carton transmission.
[0032] The technical solution in the embodiment of the present application is to solve the problem of low classification recognition rate during the above-mentioned carton transmission process. The overall idea is as follows:
[0033] The target classification set is set through the preset classification goals of carton classification. At the same time, the image data of the cartons to be classified on the conveyor belt is collected in real time by sensors and marked. Then, the key image data extracted by the image recognition principle is used to build a carton classification model and optimize the model. Finally, the optimized carton classification model is tested in a simulated classification environment. At the same time, the performance of the carton classification model when dealing with changes in the placement angle of the cartons to be classified is evaluated based on the test results, thereby achieving the effect of improving the classification recognition rate during the carton transmission process.
[0034] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0035] like Figure 1 As shown, it is a flow chart of a carton classification method based on data processing provided by an embodiment of the present application. The carton classification method based on data processing provided by the present application includes the following steps: S1, setting a target classification set according to a preset classification target of carton classification, and at the same time collecting image data of cartons to be classified on a conveyor belt in real time through sensors and marking them, and the target classification set is used to visualize the corresponding classification area set between cartons to be classified and preset classification targets; S2, using an image processing method to normalize the collected image data and extract key image data according to the principle of image recognition, and the key image data includes the appearance of the cartons to be classified. Information data and texture information data; S3, combining the extracted key image data to build a carton classification model and optimize the model. The carton classification model is used to automatically identify and classify the input cartons to be classified by learning the key image data. The classification performance is used to numerically describe the classification performance of the carton classification model during the automatic classification process; S4, testing the optimized carton classification model in a simulated classification environment, and evaluating the performance of the carton classification model when dealing with changes in the placement angle of the cartons to be classified based on the test results. The simulated classification environment is used to simulate the movement of the cartons to be classified on the conveyor belt and the changes in the placement angle.
[0036] In this embodiment, after setting the target classification set, the sensor is used to collect image data of the cartons to be classified on the conveyor belt in real time. By selecting sensor equipment with stable performance and reasonably arranging it at key positions of the conveyor belt, it is ensured that the size classification information, material classification information and purpose classification information of the cartons to be classified can be fully captured. In addition, it is also necessary to consider the impact of lighting conditions and background interference on image quality, and take corresponding measures to improve it. After the image data is collected, advanced image processing technology is used for in-depth analysis and processing. For example, we can use image recognition algorithms to classify the size of cartons, use material recognition algorithms to identify the material of cartons, and use natural language processing technology to classify the purpose of cartons. At the same time, a feedback mechanism can be introduced to monitor and adjust the classification results in real time. When the recognition rate is low, the sensor parameters can be adjusted in time, the algorithm model can be optimized, or the target classification set can be updated.
[0037] It should be understood that normalization processing includes coordinate centering and rotation normalization. Normalization processing can effectively eliminate data inconsistencies between different images caused by acquisition conditions and equipment differences, thereby improving the accuracy of subsequent image analysis and recognition. Coordinate centering is to transform the feature points or key areas in the image relative to the coordinate system of the entire image, so that all images are aligned on a unified coordinate origin, which can eliminate the position offset that may occur in the image acquisition process. Rotation normalization is to eliminate the difference in images caused by different angles. In the process of classifying cartons to be classified, since the cartons to be classified may be presented at different angles on the conveyor belt, the image needs to be rotated and corrected so that all images are consistent in direction, thereby improving the classification and recognition rate during the carton transmission process.
[0038] Furthermore, the specific steps for setting the target classification set are: analyzing the physical characteristics and functional characteristics of the cartons to be classified to identify preset classification characteristics, and setting corresponding classification standards in combination with the classification feature data within a preset time period, the classification feature data including physical feature data and functional feature data; visually displaying the correspondence between the classification feature data and the preset classification features in the form of a classification tree in combination with the classification standard and the classification recognition index, and the classification recognition index is used to measure the degree of match between the classification feature data and the preset classification features; analyzing the results of the visualization and presenting the classification logic and classification areas of the cartons to be classified in charts, and setting the target classification set in combination with actual classification needs.
[0039] In this embodiment, the node division conditions and branch direction of the classification tree are determined according to the classification standard and the classification recognition index. For example, if a certain classification feature has a greater impact on the classification result, it can be used as an earlier node, and the branch with a higher classification recognition index represents that it is more likely to belong to a certain category. Then, by visually displaying the classification tree, it can be clearly seen how the cartons to be classified are gradually divided into different categories according to physical characteristics and functional characteristics. This display method not only facilitates the understanding and analysis of the classification process, but also discovers potential classification problems and improvement points. In addition, additional information can be annotated on the classification tree, such as the classification accuracy and error rate of each node, to further evaluate the classification performance; the classification logic and classification areas of the cartons to be classified are presented in a chart, which specifically includes the following contents: Graphical presentation of classification logic: Use a A flowchart with arrows and text boxes indicates the operation and judgment conditions of each step, showing the entire process from input features to output classification results, including feature extraction, judgment, classification and other steps. Then, in a table format, rows represent feature value ranges, columns represent categories, and cells are filled with corresponding classification results, including the mapping relationship between feature value ranges and corresponding categories. The classification area is presented graphically: using colored area maps or line maps, different categories are filled with different colors, and boundary lines are clearly marked. At the same time, a two-dimensional or three-dimensional scatter plot is drawn based on key features. Each point represents a carton, and colors or shapes distinguish different categories. The clustering areas and distribution patterns of cartons of each category can be intuitively seen. Dark colors represent high correlation or high-density areas, and light colors represent low correlation or low-density areas, achieving more accurate setting of the target classification set.
[0040] Furthermore, by inputting the physical feature data, functional feature data, load-bearing capacity data and pressure resistance data into the machine learning algorithm for learning and training, and combining the actual classification needs with the preset data for corresponding predictions in sequence, and automatically identifying the differences between the preset classification targets according to the prediction results, the corresponding classification recognition index is obtained; in addition to obtaining the classification recognition index through the above machine learning algorithm, it can also be obtained and calculated through the following methods and formulas: The specific steps for obtaining the classification recognition index are: extracting key information data from the classification feature data, and setting corresponding allocation weights according to the similarity matching degree and the classification dimension to obtain the classification recognition index, the key information data is used to describe the physical characteristic information and functional characteristic information of the classification feature data, the similarity matching degree is used to measure the similarity between the classification feature data and the key information data, the classification dimension is used to quantify the load-bearing capacity and pressure resistance of the cartons to be classified during the classification process to obtain the corresponding load-bearing capacity data and pressure resistance data, the allocation weight is used to describe the influence of the physical feature data, the functional feature data, the load-bearing capacity data and the pressure resistance data on the classification recognition index, and the allocation weight includes the first weight, the second weight, the third weight and the fourth weight; the classification recognition index is calculated by the following formula:
[0041]
[0042] In the formula, y is the number of the carton to be classified, , Y is the total number of cartons to be classified, represents the classification identification index corresponding to the yth carton to be classified, e is a natural constant, Represents the preset physical feature data corresponding to the yth carton to be classified, Represents the physical feature data corresponding to the yth carton to be classified, Indicates the reference deviation of physical characteristic data, represents the first weight, Indicates the preset functional feature data corresponding to the yth carton to be classified, Represents the functional feature data corresponding to the yth carton to be classified, Indicates the reference deviation of the functional characteristic data, represents the second weight, Indicates the load-bearing capacity data corresponding to the yth carton to be classified, Indicates the reference data of load-bearing capacity. Indicates the reference deviation of the load-bearing capacity data. represents the third weight, Indicates the compression resistance data corresponding to the yth carton to be classified, Indicates the reference data of pressure resistance. Indicates the reference deviation of the pressure resistance data. Represents the fourth weight.
[0043] In this embodiment, physical feature data such as the size, shape and material of the carton are the basis for classification and identification. The more accurately these data are measured and recorded, the more accurately the category of the carton can be identified. By statistically analyzing the physical feature data of a large number of cartons, the differences in physical features of cartons of different categories can be found. Therefore, the weight of the first weight in the classification and identification index is usually higher, where the first weight represents the weight of the physical feature data relative to the classification and identification index; the functional feature data describes the purpose and design features of the carton, which is crucial for classification and identification. The more detailed and accurate the functional feature data is, the better the purpose and characteristics of the carton can be understood. By analyzing the functional feature data, the functional differences and similarities between cartons of different categories can be found. Based on these differences and similarities and combined with the second weight, a strong basis is provided for the classification algorithm, where the second weight represents the degree of influence of the functional feature data relative to the classification and identification index; the load-bearing capacity data is an important indicator reflecting the performance of the carton, which better evaluates the performance of the carton in actual use. By testing and analyzing the load-bearing capacity data, cartons with high load-bearing capacity can be quickly identified. Therefore, in the classification and identification process, the third weight should be set according to actual needs, where the third weight indicates the influence of the load-bearing capacity data on the classification and identification index; the compression resistance data describes the stability of the carton when subjected to external forces. During transportation and storage, the carton may be subjected to forces such as squeezing and collision. The more accurate the compression resistance data is, the better the performance of the carton during transportation and storage can be predicted. Therefore, the fourth weight is usually set according to the use environment and needs of the carton, where the fourth weight indicates the influence of the compression resistance data on the classification and identification index; in summary, the physical feature data, functional feature data, load-bearing capacity data and compression resistance data have a proportional impact on the classification and identification index, and the physical feature data and compression resistance data have the highest weight. Generally speaking, the first weight accounts for 30%, the second weight accounts for 20%, the third weight accounts for 20%, and the fourth weight accounts for 30%. The specific weights need to be set according to actual needs. By improving the accuracy and completeness of these data, the accuracy of the classification and identification index can be significantly improved, and the accuracy and reliability of the classification of the cartons to be classified can be improved.
[0044] Furthermore, the specific steps of extracting key image data include: encoding the collected image data and mapping it to the pixel position corresponding to the coordinate image; correcting the rotation angle deviation of the cartons to be classified during conveyor belt transportation, and detecting the main direction of the image data on the coordinate image and determining the rotation angle between it and the expected main direction; rotating the image data according to the determined rotation angle and using the rotation transformation matrix to obtain regular image data; using the edge detection method to extract the outline of the carton to be classified, and using the filter to filter the regular image data to determine the texture features of the carton to be classified; inputting the outline of the carton to be classified and the texture features of the carton to be classified into the grayscale co-occurrence matrix to extract key image data.
[0045] In this embodiment, during the conveyor belt transportation process, the cartons to be classified may have rotation angle deviations due to various reasons, which will have an adverse effect on the accuracy of classification and recognition. Therefore, it is very important to correct the rotation angle deviation. Through image processing technology, the main direction of the image data on the coordinate image can be detected and compared with the expected main direction to determine the rotation angle. Once the rotation angle is determined, the image data can be rotated using a rotation transformation matrix, wherein the rotation transformation matrix can accurately rotate the image according to a given rotation angle to obtain regular image data, that is, image data with the rotation angle deviation eliminated, and then the image data can be corrected by the image processing technology. By filtering the regular image data with a filter, certain frequency components in the image can be highlighted or suppressed, thereby extracting the texture features of the carton. After extracting the contour and texture features of the carton to be classified, this information is input into the grayscale co-occurrence matrix to further extract key image data. The grayscale co-occurrence matrix is a statistical method for describing image texture. It reflects texture features by counting the frequency of occurrence of different grayscale levels in the image, and can effectively extract key information reflecting the texture of the carton. The combination of contour and texture features can provide us with more comprehensive and accurate information about the cartons to be classified, and achieve more accurate identification of the cartons to be classified.
[0046] Further, such as Figure 2As shown, it is a flow chart for constructing a carton classification model provided in an embodiment of the present application. The specific steps of constructing a carton classification model in combination with the extracted key image data include: obtaining a target classification set area according to a target classification set and in combination with actual classification requirements, and mapping the pixel points of the key image data in the grayscale co-occurrence matrix with a preset target classification set area according to an image correction threshold; converting the key image data into a model numerical form, and designing a model network architecture in combination with the data complexity of the key image data. The data complexity represents the complexity of the key image data obtained by analyzing the degree of discreteness of the pixel points of the key image data in the preset target classification set area. The model network architecture is used to regularize the model numerical form of the key image data to eliminate overfitting and underfitting of the model numerical form; constructing a carton classification model according to the designed model network architecture and in combination with the model architecture conformity coefficient. The model architecture conformity coefficient is used to measure the degree of adaptation between the model network architecture and the carton classification model.
[0047] In this embodiment, the image correction threshold is used to measure the degree of difference in brightness and contrast between key image data, which helps to eliminate noise and inconsistency in the image and improve the quality of image data. By setting an appropriate threshold (usually between 0 and 1, determined according to actual conditions), the pixel points of the key image data can be mapped to the target classification set area. After the mapping is completed, the key image data is converted into a model numerical form. This step is to enable the image data to be understood and processed by the machine learning model. Usually, we can use image feature extraction methods (such as convolutional neural networks) to convert image data into feature vectors or matrices as input to the model. These feature vectors or matrices can capture the key information in the image and provide an effective basis for model training and classification. For carton classification tasks, data complexity usually includes the diversity of carton shapes to be classified, the complexity of textures, and changes in lighting conditions. When designing the model network architecture, these factors need to be considered to select the appropriate number of network layers and nodes to build a carton classification model that can effectively process complex data, thereby improving the classification efficiency of the carton classification model.
[0048] Furthermore, the preset model architecture is automatically searched and evaluated through the hyperparameter optimization tool in the automated machine learning method, and the most suitable model structure architecture is selected and tested in combination with the actual classification requirements and key image data. Then, according to the test results and by comparing the classification performance of the model architecture, the degree of conformity between the model architecture and the preset classification performance of the model is evaluated to obtain the model architecture conformity coefficient. In addition to obtaining the model architecture conformity coefficient through the above-mentioned automated machine learning algorithm, it can also be obtained and calculated through the following methods and formulas: The model architecture conformity coefficient is obtained by the following method: A classification benchmark model is constructed based on the image correction threshold and the classification recognition index, and the constructed classification is evaluated using the key image data. The classification benchmark model is used for model training. The classification benchmark model is used to visualize the performance of simulated classification of cartons to be classified on a conveyor belt. The classification benchmark model is evaluated according to the preset evaluation indicators. At the same time, the evaluation results are used to determine whether the performance of simulated classification of cartons to be classified meets the preset evaluation indicators. If so, the model architecture compliance coefficient is obtained according to the data complexity and data similarity. Otherwise, the constructed classification benchmark model is retrained until the preset evaluation indicators are met. The data similarity represents the similarity of the key image data obtained by analyzing the grayscale values of the pixels of the key image data in the preset target classification set area. The model architecture compliance coefficient is calculated by the following formula:
[0049] ,
[0050] In the formula, i is the number of times the model is trained. , M is the total number of model training times, It indicates the model architecture conformity coefficient corresponding to the i-th model training, e is a natural constant, represents the brightness of the key image data corresponding to the i-th model training, Indicates the reference brightness of key image data, Indicates the reference deviation of the brightness of key image data, represents the contrast of the key image data corresponding to the i-th model training, represents the reference contrast of key image data, represents the reference deviation of the contrast of key image data, represents the data complexity corresponding to the i-th model training, represents the data reference complexity, represents the data complexity reference deviation, represents the data similarity corresponding to the i-th model training, represents the data reference similarity, Represents the data similarity reference deviation.
[0051] In this embodiment, a classification benchmark model is constructed according to the complexity of the actual classification task and in combination with the image correction threshold, and a hyperparameter of the initial learning rate is set. This data is used to control the speed of model training. At the same time, a loss function corresponding to the classification task is selected. The loss function is used to measure the difference between the classification performance of the classification benchmark model in the process of executing the classification task and the preset effect of the actual classification task. Then, a data preprocessing process of the key image data is set, which usually includes data loading, classification output, back propagation and parameter updating, wherein back propagation is used to update the parameters of the classification benchmark model during the model training process to minimize the loss function; according to the task requirements, a preset evaluation index is set, and the performance index of the simulated classification is compared with the preset evaluation index. If the performance index of the simulated classification meets or exceeds the preset evaluation index, it is considered that the performance is good. Otherwise, it is necessary to further analyze the possible reasons (such as insufficient model complexity, insufficient training data or excessive noise). According to the analysis results, the model architecture is adjusted, the training data is increased, and noise processing is performed, and the performance index of the simulated classification is compared with the preset evaluation index. Retrain the model with the adjusted model and the new data set, repeat the above steps, and continuously iterate and optimize the model until the performance of the simulated classification meets the preset evaluation indicators; the reference value in the calculation formula of the model architecture compliance coefficient is usually obtained by weighted averaging a large amount of existing historically good data, where data complexity usually refers to the number of categories in the data set, the correlation between features, the noise level, and the distribution of data. The higher the data complexity, the stronger the expressive ability and more complex structure of the carton classification model are needed to capture the patterns and laws in the data; data similarity refers to the similarity between the training data and the data to be classified. If the training data is very similar to the data to be classified, then the carton classification model may be more likely to learn effective feature representations from the training data and achieve good performance on the data to be classified. On the contrary, if the similarity between the two is low, the carton classification model may be difficult to generalize to new data, resulting in a decrease in classification performance; more accurate acquisition of the model architecture compliance coefficient is achieved.
[0052] Furthermore, the specific steps of model optimization are: performing corner point detection on the placement angle of the cartons to be classified on the conveyor belt, and comparing the placement angle of the corner point detection with the preset standard angle in the target classification set area; generating integrated rotation information based on the comparison results and combined with the rotation compliance coefficient, and the rotation compliance coefficient is used to measure the degree of adaptation of the cartons to be classified to the target classification set area after the placement angle changes; and performing secondary training on the carton classification model in combination with the integrated rotation information to realize automatic classification when the placement angle of the cartons to be classified changes.
[0053] In this embodiment, the specific steps of corner point detection are: according to the shape and size of the cartons to be classified and the characteristics of the conveyor belt, the corner point detection algorithm is applied to the key image data to extract the corner point features of the cartons. These corner points are usually points in the image where the grayscale value changes dramatically, and can represent the edge and outline of the carton; by matching the corner points between adjacent frame images, the corresponding corner points of the same carton in different images are determined; based on the matched corner points, the placement angle of the carton to be classified on the conveyor belt is determined by calculating the vector relationship or geometric transformation between the corner points, which usually involves vector angle calculation and matrix transformation; the specific steps of secondary training of the carton classification model are: extracting the placement angle information in the key image data and converting it into a model readable form, for example, converting the angle value into a vector through an angle encoding layer. quantitative form; the encoded angle information is fused with the extracted placement angle information by splicing and using the attention mechanism; the carton classification model is initially trained using a dataset with labels and rotation information, allowing the carton classification model to learn how to classify according to the features and placement angles of the cartons; the model performance after the initial training is evaluated on the validation set, and the classification accuracy of the carton classification model at different placement angles is analyzed; the carton classification model is retrained based on the model performance after the initial training and using the rotation-enhanced dataset; the trained carton classification model is deployed to actual application scenarios, such as being integrated into a machine vision system on a conveyor belt, and the automatic classification performance of the carton classification model when the placement angle changes is verified, achieving more accurate optimization and recognition of the carton classification model.
[0054] Furthermore, the rotation conformity coefficient is obtained by the following method: the result after the secondary training of the carton classification model is evaluated and the confidence and confidence evaluation factor are obtained in combination with the reference confidence. The confidence is used to measure the credibility that the carton to be classified belongs to the target classification area under the placement angle. The confidence evaluation factor represents the influence of the confidence on the placement angle during the classification process of the carton to be classified; the corner point matching degree and the angle difference value are obtained according to the results of corner point detection. The corner point matching degree is used to measure the degree of matching between the placement corner point position of the corner point detection and the expected corner point position in the target classification set area. The angle difference value is used to measure the degree of deviation between the placement angle of the corner point detection and the preset standard angle in the target classification set area; the rotation conformity coefficient is obtained by combining the relative deviation of the corner point matching degree and the relative deviation of the angle difference value.
[0055] In this embodiment, the actual rotation angle distribution of the carton images to be classified in the statistical test set is statistically analyzed, and the similarity of the distribution is compared with the preset standard angle distribution. Then, a statistical indicator (such as a chi-square test) is used to quantify the difference between the two angle distributions. According to the result of the distribution difference, the rotation compliance coefficient is obtained. In practical applications, this coefficient can be a function of the difference value (such as the inverse of the difference value, the normalized value of the difference value). The rotation compliance coefficient is obtained by the above statistical analysis method, and can also be calculated by the following formula:
[0056] ,
[0057] In the formula, r is the number of corner point detection times, , R is the total number of corner point detections, It represents the rotation coefficient corresponding to the rth corner point detection, e is a natural constant, represents the confidence assessment factor, Represents the confidence corresponding to the rth corner point detection, represents the reference confidence level, Indicates the corner point matching degree corresponding to the rth corner point detection, represents the reference matching degree of the corner point, Indicates the angle reference difference value, Represents the angle difference value; the detected corner point is matched with the expected corner point position in the reference image. The matching process can be achieved by comparing the feature descriptions between the corner points (such as calculating the Euclidean distance or cosine similarity between the feature descriptions) and comparing with the feature descriptors of the expected corner points. The more successful matches there are, the higher the matching degree is. Similarly, the angle difference value usually compares the detected angle with the expected angle to obtain the difference between them or the absolute value difference of the angle. At the same time, the corner reference matching degree and the angle reference difference value are obtained by weighted averaging the existing large amount of historical data with good performance, and the rotation conformity coefficient is comprehensively evaluated in combination with the above-mentioned values.
[0058] Specifically, the comprehensive evaluation also needs to combine the confidence and confidence evaluation factor of the placement angle of the cartons to be classified. The specific acquisition content includes: setting a test set based on the key image data and the results of the secondary training, inputting the test set into the carton classification model to output the probability distribution belonging to each category, selecting the category with the highest probability as the predicted category, and taking the highest probability as the reference confidence, and then setting a confidence threshold according to the actual application needs. When the reference confidence is higher than the threshold, it is considered that the classification result of the model has a high credibility, otherwise, it is considered that the classification result may be unreliable; the confidence evaluation factor is mainly used to measure the impact of the placement angle on the confidence, usually based on the difference between the placement angle obtained by corner point detection and the actual placement angle in the test set. This factor can be a function of the angle difference value (such as using an inverse proportional function or an exponential function), so that when the angle difference is small, the factor is large, and when the angle difference is large, the factor is small. Finally, the reference confidence is combined with the confidence evaluation factor, and the impact of the model's classification probability and the placement angle on the classification result is comprehensively considered, so as to improve the accuracy and reliability of the rotation compliance coefficient.
[0059] Further, such as Figure 3 As shown, it is a test flow chart of the carton classification model provided in an embodiment of the present application. The specific steps of testing the carton classification model after model optimization in a simulated classification environment include: building a simulated classification environment according to the actual application scenario, and acquiring a test data set in combination with the classification performance of the carton classification model, the test data set representing the image data of the carton to be classified under a preset category and a preset placement angle; loading the carton classification model after model optimization into the simulated classification environment, and setting the test parameters of the batch sequence and the number of test rounds according to the actual test requirements, and evaluating the classification performance of the carton classification model in combination with the performance evaluation indicators; adjusting the test parameters according to the evaluation results and iteratively optimizing the carton classification model until the performance evaluation indicators are met.
[0060] In this embodiment, the batch order is usually set by determining the input order of the test data, which can be random or in a specific order (such as by category or by placement angle); the number of test rounds is usually set by setting the number of test rounds, that is, the number of times the model predicts the test data. In order to obtain more stable and reliable evaluation results, multiple rounds of testing can be performed and the test results can be statistically analyzed; the performance evaluation index is usually set according to the performance of the carton classification model during the training and testing process. At the same time, based on the performance evaluation results, targeted optimization suggestions are put forward: if the overall performance is not good, consider adjusting the model structure, increasing training data or optimizing the training strategy; if some categories perform poorly, you can try to increase the number of samples in these categories, improve the feature extraction method or introduce a category balancing strategy; if the model is sensitive to the placement angle, you can consider adding a data enhancement strategy for angle changes during the training process; a more accurate evaluation of the classification performance of the cartons to be classified is achieved.
[0061] like Figure 4 As shown, it is a structural schematic diagram of a carton classification device based on data processing provided in an embodiment of the present application. The carton classification device based on data processing provided in an embodiment of the present application includes: an image data acquisition module, a key image data extraction module, a model optimization module and a test evaluation module; wherein the image data acquisition module is used to set a target classification set according to a preset classification target of carton classification, and at the same time, the image data of the cartons to be classified on the conveyor belt is collected in real time by a sensor and marked, and the target classification set is used to visualize the corresponding classification area set between the cartons to be classified and the preset classification target; the key image data extraction module is used to use an image processing method to normalize the collected image data and extract key data according to the principle of image recognition. Key image data, the key image data includes the appearance information data and texture information data of the cartons to be classified; the model optimization module is used to build a carton classification model in combination with the extracted key image data and optimize the model. The carton classification model is used to automatically identify and classify the input cartons to be classified by learning the key image data. The classification performance is used to numerically describe the classification performance of the carton classification model during the automatic classification process; the test evaluation module is used to test the optimized carton classification model in a simulated classification environment, and evaluate the performance of the carton classification model when processing the changes in the placement angle of the cartons to be classified based on the test results. The simulated classification environment is used to simulate the movement of the cartons to be classified on the conveyor belt and the changes in the placement angle.
[0062] In this embodiment, in actual applications, since the placement angle of the cartons to be classified may change due to human factors or the operation of automated equipment, the carton classification model needs to be robust to angle changes. Through the test evaluation module, carton images at different angles can be simulated to observe the classification performance of the carton classification model under these changes, so as to determine whether the carton classification model can effectively cope with the challenges brought by angle changes. Secondly, during the test process, the prediction results of the model at different angles can be collected and compared with the actual labels, and visualization tools can be used to more intuitively display the classification effects of the carton classification model in different categories and at different angles, thereby achieving more accurate classification of the cartons to be classified.
[0063] The technical solution in the above-mentioned embodiment of the present application has at least the following technical effects or advantages: relative to a data processing system for entity classification announced in the invention patent with announcement number: CN116227495B, the embodiment of the present application obtains the target classification set area through the target classification set and combines the actual classification requirements, and at the same time combines the image correction threshold to map the pixel points of the key image data in the grayscale co-occurrence matrix with the preset target classification set area, and then converts the key image data into a model numerical form, and designs the model network architecture in combination with the data complexity of the key image data, and finally constructs a carton classification model according to the designed model network architecture and in combination with the model architecture compliance coefficient, thereby achieving the accuracy of the model architecture compliance coefficient. Acquisition, thereby achieving a more accurate construction of the carton classification model; relative to the text classification model training, classification method and system and data processing system announced in the invention patent with announcement number: CN113177119B, the embodiment of the present application performs corner point detection on the placement angle of the cartons to be classified on the conveyor belt, and compares the placement angle of the corner point detection with the preset standard angle in the target classification set area, and then generates integrated rotation information based on the comparison result and combined with the rotation compliance coefficient, and finally performs secondary training on the carton classification model in combination with the integrated rotation information to achieve automatic classification when the placement angle of the cartons to be classified changes, thereby achieving an improvement in the accuracy of corner point detection, and then achieving a more accurate classification of the cartons to be classified.
[0064] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0065] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0066] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0068] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0069] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A carton classification method based on data processing, characterized in that: The following steps are involved: S1, setting a target classification set according to a preset classification target of carton classification, and collecting image data of the carton to be classified on the conveyor belt in real time through a sensor and marking the image data, wherein the target classification set is used to visualize the corresponding classification area set between the carton to be classified and the preset classification target; S2, using an image processing method to normalize the collected image data and extract key image data according to an image recognition principle, wherein the key image data includes appearance information data and texture information data of the cartons to be classified; S3, building a carton classification model in combination with the extracted key image data and optimizing the model, wherein the carton classification model is used to automatically identify and classify input cartons to be classified by learning the key image data, and the classification performance is used to numerically describe the classification performance of the carton classification model during the automatic classification process; S4, testing the optimized carton classification model in a simulated classification environment, and evaluating the performance of the carton classification model in processing the change of the placement angle of the carton to be classified according to the test results, wherein the simulated classification environment is used to simulate the movement and placement angle change of the carton to be classified on the conveyor belt; The specific steps of setting the target classification set are: Analyze the physical characteristics and functional characteristics of the cartons to be classified to identify preset classification characteristics, and set corresponding classification standards in combination with classification characteristic data within a preset time period, wherein the classification characteristic data includes physical characteristic data and functional characteristic data; The corresponding relationship between the classification feature data and the preset classification feature is visualized in the form of a classification tree in combination with the classification standard and the classification recognition index, wherein the classification recognition index is used to measure the matching degree between the classification feature data and the preset classification feature; Analyze the results of the visualization and present the classification logic and classification areas of the cartons to be classified in a chart, and set the target classification set based on the actual classification needs; The specific steps for obtaining the classification identification index are: Extract key information data from the classification feature data, and set corresponding allocation weights according to the similarity matching degree and the classification dimension to obtain a classification identification index, wherein the key information data is used to describe the physical characteristic information and functional characteristic information of the classification feature data, the similarity matching degree is used to measure the similarity between the classification feature data and the key information data, the classification dimension is used to quantify the load-bearing capacity and pressure resistance of the cartons to be classified during the classification process to obtain corresponding load-bearing capacity data and pressure resistance data, and the allocation weights are used to describe the influence of the physical feature data, the functional feature data, the load-bearing capacity data and the pressure resistance data on the classification identification index, and the allocation weights include a first weight, a second weight, a third weight and a fourth weight; The classification recognition index is calculated by the following formula: , In the formula, y is the number of the carton to be classified, , Y is the total number of cartons to be sorted, represents the classification identification index corresponding to the yth carton to be classified, e is a natural constant, Represents the preset physical feature data corresponding to the yth carton to be classified, Represents the physical feature data corresponding to the yth carton to be classified, Indicates the reference deviation of physical characteristic data, represents the first weight, Indicates the preset functional feature data corresponding to the yth carton to be classified, represents the functional feature data corresponding to the yth carton to be classified, Indicates the reference deviation of functional characteristic data, represents the second weight, Indicates the load-bearing capacity data corresponding to the yth carton to be classified, Indicates the reference data of load-bearing capacity. Indicates the reference deviation of the load-bearing capacity data. represents the third weight, Indicates the compression resistance data corresponding to the yth carton to be classified, Indicates the reference data of pressure resistance. Indicates the reference deviation of the pressure resistance data. represents the fourth weight; The specific steps of extracting the key image data include: Encode the collected image data and map it to the pixel position corresponding to the coordinate image; Correct the rotation angle deviation of the cartons to be sorted during the conveyor belt transportation, and detect the main direction of the image data on the coordinate image and determine the rotation angle between it and the expected main direction; Rotating the image data according to the determined rotation angle and using a rotation transformation matrix to obtain regular image data; The edge detection method is used to extract the outline of the cartons to be classified, and the filter is used to filter the regular image data to determine the texture features of the cartons to be classified; Inputting the outline of the carton to be classified and the texture features of the carton to be classified into the gray level co-occurrence matrix to extract key image data; The specific steps of building a carton classification model by combining the extracted key image data include: The target classification set region is obtained according to the target classification set and combined with the actual classification requirements, and the pixel points of the key image data in the gray level co-occurrence matrix are mapped to the preset target classification set region according to the image correction threshold; The key image data is converted into a model numerical form, and a model network architecture is designed in combination with the data complexity of the key image data, wherein the data complexity represents the complexity of the key image data obtained by analyzing the discrete degree of pixels of the key image data in a preset target classification set area, and the model network architecture is used to regularize the model numerical form of the key image data to eliminate overfitting and underfitting of the model numerical form; Constructing a carton classification model according to the designed model network architecture and in combination with the model architecture conformity coefficient, wherein the model architecture conformity coefficient is used to measure the degree of adaptation between the model network architecture and the carton classification model; The model architecture compliance coefficient is obtained by the following method: Building a classification benchmark model based on an image correction threshold and a classification recognition index and using key image data to train the built classification benchmark model, wherein the classification benchmark model is used to visualize the performance of simulated classification of cartons to be classified on a conveyor belt; The classification benchmark model is evaluated according to the preset evaluation index, and at the same time, it is judged whether the performance of the simulated classification of the to-be-classified cartons meets the preset evaluation index according to the evaluation result. If it meets the preset evaluation index, the model architecture conformity coefficient is obtained according to the data complexity and data similarity. Otherwise, the constructed classification benchmark model is retrained until the preset evaluation index is met. The data similarity represents the similarity degree of the key image data obtained by analyzing the grayscale value of the pixel point of the key image data in the preset target classification set area; The model framework compliance coefficient is calculated using the following formula: , In the formula, i is the number of times the model is trained. , M is the total number of model training times, It indicates the model architecture conformity coefficient corresponding to the i-th model training, e is a natural constant, represents the brightness of the key image data corresponding to the i-th model training, Indicates the reference brightness of key image data, Indicates the reference deviation of the brightness of key image data, represents the contrast of the key image data corresponding to the i-th model training, represents the reference contrast of key image data, represents the reference deviation of the contrast of key image data, represents the data complexity corresponding to the i-th model training, represents the data reference complexity, represents the data complexity reference deviation, represents the data similarity corresponding to the i-th model training, represents the data reference similarity, Represents the data similarity reference deviation.
2. A carton classification method based on data processing as claimed in claim 1, characterized in that: The specific steps of the model optimization are: Perform corner point detection on the placement angle of the cartons to be classified on the conveyor belt, and compare the placement angle detected by the corner point detection with the preset standard angle in the target classification set area; Generate integrated rotation information based on the comparison result and in combination with the rotation compliance coefficient, wherein the rotation compliance coefficient is used to measure the degree of adaptation between the to-be-classified cartons and the target classification set area after the placement angle is changed; The carton classification model is retrained with integrated rotation information to achieve automatic classification when the placement angle of the cartons to be classified changes.
3. A carton classification method based on data processing as claimed in claim 2, characterized in that: The rotation coincidence coefficient is obtained by the following method: The results of the secondary training of the carton classification model are evaluated and combined with the reference confidence to obtain the confidence and confidence evaluation factor, wherein the confidence is used to measure the credibility of the carton to be classified belonging to the target classification area under the placement angle, and the confidence evaluation factor represents the influence of the confidence on the placement angle during the classification process of the carton to be classified; Obtaining a corner point matching degree and an angle difference value according to the result of corner point detection, wherein the corner point matching degree is used to measure the matching degree between the placement corner point position of the corner point detection and the expected corner point position in the target classification set area, and the angle difference value is used to measure the deviation degree between the placement angle of the corner point detection and the preset standard angle in the target classification set area; The rotation conformity coefficient is obtained by combining the relative deviation of corner point matching and the relative deviation of angle difference.
4. A carton classification method based on data processing as claimed in claim 1, characterized in that: The specific steps of testing the carton classification model after model optimization in the simulated classification environment include: A simulated classification environment is built according to the actual application scenario, and a test data set is obtained in combination with the classification performance of the carton classification model, wherein the test data set represents image data of the carton to be classified under a preset category and a preset placement angle; Load the optimized carton classification model into the simulated classification environment, set the test parameters of batch order and number of test rounds according to the actual test requirements, and evaluate the classification performance of the carton classification model in combination with the performance evaluation indicators; According to the evaluation results, the test parameters are adjusted and the carton classification model is iteratively optimized until the performance evaluation indicators are met.
5. A device for applying a carton classification method based on data processing as described in any one of claims 1 to 4, characterized in that: include: Image data acquisition module, key image data extraction module, model optimization module and test evaluation module; The image data acquisition module is used to set a target classification set according to a preset classification target for carton classification, and at the same time, collect image data of the cartons to be classified on the conveyor belt in real time through sensors and mark them. The target classification set is used to visualize the corresponding classification area set between the cartons to be classified and the preset classification target; The key image data extraction module is used to normalize the collected image data using an image processing method and extract key image data according to an image recognition principle, wherein the key image data includes appearance information data and texture information data of the cartons to be classified; The model optimization module is used to construct a carton classification model in combination with the extracted key image data and perform model optimization. The carton classification model is used to automatically identify and classify input cartons to be classified by learning the key image data. The classification performance is used to numerically describe the classification performance of the carton classification model during the automatic classification process. The test evaluation module is used to test the optimized carton classification model in a simulated classification environment, and at the same time evaluate the performance of the carton classification model when dealing with changes in the placement angle of the cartons to be classified based on the test results. The simulated classification environment is used to simulate the movement and placement angle changes of the cartons to be classified on the conveyor belt.
