Artificial intelligence identification method for cigarette inventory

Through methods such as multi-dimensional feature fusion, dynamic clustering and merging, and voting mechanisms, the problem of low accuracy and poor robustness in cigarette end recognition in the warehouse environment is solved, achieving efficient and accurate recognition results and improving the stability of the system. ity and applicability.

CN118629024AInactive Publication Date: 2024-09-10SHENZHEN AIMALL TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411092243.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-09-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology has low accuracy and poor robustness in identifying cigarette ends in a warehouse environment. It is especially difficult to achieve efficient and accurate identification under uneven light and complex conditions.

Method used

Multi-dimensional feature fusion method is used to combine feature vector similarity and spatial distance information, dynamic clustering and merging algorithm, recognition result decision-making based on voting mechanism, quality assessment filtering mechanism and score adjustment and re-identification method to improve the accuracy and stability of recognition. .

Benefits of technology

It significantly improves the recognition accuracy of cigarette ends, enhances the robustness of the system, reduces computational complexity and processing time, and is suitable for complex warehousing environments and other industrial scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118629024A
    Figure CN118629024A
Patent Text Reader

Abstract

The invention discloses an artificial intelligence identification method for cigarette inventory, which comprises the following steps: acquiring warehouse picture data, and detecting and identifying the warehouse picture data to obtain corresponding feature vectors and bounding boxes; s200, constructing a warehouse picture data grid model, wherein the grid model comprises a grid prediction bounding box module and a category information identification module; wherein the warehouse picture data grid model comprises a YOLO target detection algorithm used for detecting the cigarette ends, and in 500 tested pictures, the accuracy rate of the original robust recognition method for the cigarette ends is 92.2%, and the accuracy rate of the robust recognition method for the cigarette ends is 98.2%. The obvious improvement proves the effectiveness of the method for identifying the cigarette ends in a complex storage environment, and the identification accuracy of the cigarette ends is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to an artificial intelligence recognition method for cigarette inventory. Background Art

[0002] In warehouse conditions, cigarette tip recognition is of great significance, especially for quality control and logistics management. However, warehouse environments often have challenges such as insufficient light, cluttered cigarette packs, and complex packaging, which puts higher demands on the recognition system. At present, traditional visual inspection methods often fail to achieve ideal results in complex warehouse environments, and the recognition accuracy and robustness are low.

[0003] Publication number CN111126536A, invention name: A Chinese invention of a method, device and storage medium for generating storage location information, discloses receiving, through a robot management system, a graphic code identification recognized by a robot when it moves to establish an environmental map corresponding to a storage environment; based on the number of pre-configured cargo locations of each row of shelves in the storage environment, using the received graphic code identification, batch-generated storage locations corresponding to the cargo locations of each row of shelves; based on the batch-generated storage locations, configuring for each storage location association information associated with the cargo location, to obtain storage location location information corresponding to the cargo location; achieving the purpose of batch-generating storage location location information, improving the efficiency and accuracy of storage location location generation, and saving labor costs and time costs.

[0004] In the prior art, when the images of cigarette ends taken under storage conditions encounter uneven lighting, insufficient lighting, etc., the appearance of the cigarette ends will show relatively large differences, resulting in the ends that should have been clustered into the same cluster group being divided into multiple cluster groups, resulting in a reduction in the end score and errors in the recognition results, which seriously affects the accuracy and robustness of the recognition algorithm. Therefore, an artificial intelligence recognition method for cigarette inventory is proposed. Summary of the invention

[0005] In view of this, the embodiment of the present invention hopes to provide an artificial intelligence identification method for cigarette inventory to solve or alleviate the technical problems existing in the prior art. In view of the problems of low accuracy and poor robustness of the prior art in identifying cigarette ends in a storage environment, a method that can achieve efficient and accurate identification under complex storage conditions is proposed, and at least a beneficial option is provided for this. The technical solution of the embodiment of the present invention is achieved as follows: First aspect: An artificial intelligence identification method for cigarette inventory.

[0006] 1. Technical Overview 1. Multi-dimensional feature fusion method; In the process of cigarette box recognition, a feature fusion method is used to combine feature vector similarity and spatial distance information.

[0007] The main difference is that compared with the single feature recognition method, the spatial distance information is added, which improves the accuracy of clustering and recognition.

[0008] 2. Dynamic clustering merging algorithm; An algorithm that optimizes clustering results by merging preliminary clusters and overlapping clusters.

[0009] Main difference: Dynamically merge overlapping cluster groups to ensure the compactness and accuracy of clustering results.

[0010] 3. Identification result decision method based on voting mechanism; A decision-making method for selecting the most likely cigarette pack ID through a voting mechanism within a cluster group.

[0011] The main difference: Through the voting mechanism, the stability of the recognition results is improved and the uncertainty of a single recognition result is avoided.

[0012] 4.Quality assessment filtering mechanism; A method for filtering recognition results in low-quality images using quality assessment results.

[0013] Main difference: Quality assessment is introduced to improve the recognition accuracy of low-quality images.

[0014] 5. Score adjustment and re-identification methods; A method for dynamically adjusting recognition scores and performing re-recognition when necessary.

[0015] The main difference is that when the score is below the threshold, it is identified as unknown, and the overall recognition effect is improved through re-identification and score correction.

[0016] 2. Pioneer Concept 1. Multi-dimensional feature fusion; Combining the similarity of feature vectors and the spatial distance information of detection boxes, more accurate clustering is achieved by calculating the cosine similarity matrix and spatial position distance matrix.

[0017] 2. Dynamic clustering and merging; The method of preliminary clustering and overlapping cluster merging is used to ensure that the final clustering result is tighter and more accurate, and the recognition accuracy is improved by continuously merging overlapping cluster groups.

[0018] 3. Voting mechanism; In each cluster group, the most likely cigarette box ID is selected through a voting mechanism, and the recognition result is adjusted to improve the stability and robustness of the recognition result.

[0019] 4.Quality assessment filtering; A quality assessment mechanism is introduced to filter recognition results in low-quality images to further improve recognition accuracy.

[0020] 5. Score adjustment; The recognition score is dynamically adjusted. If the score of a patch is lower than the threshold, it is identified as unknown and re-identified and the score corrected when necessary.

[0021] (III) Technical content An artificial intelligence identification method for cigarette inventory includes the following steps: S100, obtaining warehouse image data, and obtaining corresponding feature vectors and bounding boxes by detecting and identifying the warehouse image data; S200, constructing a warehouse image data grid model, wherein the grid model includes a grid prediction bounding box module and a category information recognition module; wherein the warehouse image data grid model includes a YOLO target detection algorithm for detecting cigarette ends; S300, extracting image features through a convolutional neural network according to the grid prediction bounding box and category information; S400, constructing a cigarette end robust recognition model, the cigarette end robust recognition model is used for robust recognition of cigarette ends in a storage environment, wherein the cigarette end robust recognition model is used to perform feature vector normalization, similarity matrix calculation, distance matrix calculation, preliminary clustering, cluster merging, and voting decision; S500, by adjusting the scores and filtering the recognition results in the images with low quality assessment scores, finally obtaining the result and score of cigarette end recognition.

[0022] Further preferably, the detecting and identifying the warehouse image data to obtain the corresponding feature vector and bounding box specifically includes: Image input: extracting a storage environment image I as input from the warehouse image data, which contains a plurality of cigarette ends N; Bounding box detection B: Use the detection algorithm to identify the cigarette ends in the storage environment image I and obtain the position bounding box B of each cigarette end i ; Feature extraction V: Through preprocessing and feature extraction algorithm F, each position bounding box B i The image region corresponding to the bounding box region is converted into a feature vector.

[0023] Further preferably: in S200, the YOLO target detection algorithm specifically includes: Input image: adjust the input storage environment image to a fixed size; Feature extraction: Extract image features from warehouse environment images adjusted to a fixed size through a grid model; Bounding box prediction: The grid model outputs a bounding box and confidence score for each grid cell based on the image features; The category information includes positioning loss, confidence loss and classification loss.

[0024] Further preferably, in S300, obtaining the image features of the cigarette end specifically includes: Convolutional layer: extracting local features of the cigarette end image through multiple convolutional layers; Pooling layer: The dimension of the feature map is reduced through the pooling layer; Fully connected layer: The feature map after convolution and pooling is converted into a feature vector through the fully connected layer, and the feature vector is normalized.

[0025] Further preferably, in the S400, the feature vector is normalized, and the extracted feature vector is normalized, including: For a feature vector , the L2 normalized feature vector .

[0026] Further preferably: in the S400, the similarity matrix is ​​calculated by calculating the dot product between the eigenvectors to obtain the similarity matrix. Given two eigenvectors V i and V j ; Construct a similarity matrix S, where each element s ij represents the cosine similarity between the i-th eigenvector and the j-th eigenvector.

[0027] Further preferably: in the S400, the distance matrix calculation, calculating the distance matrix according to the center point position of the detection frame, includes: Given the center coordinates of the two detection boxes Ci=(x i , y i ) and Cj=(x j , y j ), use Euclidean distance to calculate the distance between the center points of two detection boxes; Normalized distance matrix D norm .

[0028] Further preferably: in S400, the preliminary clustering classifies the feature vectors whose similarity is greater than the historical single threshold into one category, and each feature vector belongs to a preliminary cluster group C; each feature vector initially belongs to a cluster alone, and all feature vectors are assigned to clusters to obtain a cluster set.

[0029] Further preferably: in the S400, the cluster merging checks and merges overlapping cluster sets, and merges the cluster sets with intersections into one group through set operations; The voting decision: In each cluster group, the expected cigarette ID is selected through a voting mechanism, the weight sum of each ID in the group is calculated and sorted, and the ID with the first weight ranking is selected as the final ID of the group, and the weight sum of each cigarette ID is calculated.

[0030] Compared with the prior art, the present invention has the following beneficial effects: 1. Accuracy is significantly improved In the 500 images tested, the accuracy of the original robust recognition method without the cigarette end addition was 92.2%, and the accuracy of the robust recognition method with the cigarette end addition was 98.2%. This significant improvement proves the effectiveness of the method in identifying cigarette ends in complex storage environments and greatly improves the recognition accuracy of cigarette ends.

[0031] 2. Enhanced robustness After using this robust cigarette end recognition method, the system can still maintain a high level of recognition accuracy when dealing with different lighting conditions, occlusion situations and angle changes. This shows that the method has strong robustness and can adapt to various complex situations in actual storage environments, ensuring the stability and reliability of the recognition results.

[0032] 3. Improved processing efficiency While maintaining high recognition accuracy, this method optimizes the processing flow, reduces computational complexity, and improves processing efficiency. Under the same hardware conditions, the processing time is shortened by about 30% compared to traditional methods, achieving rapid response. This is of great significance for warehouse management systems that require real-time monitoring and rapid decision-making.

[0033] 4. Wide applicability This method is not only applicable to the current warehousing environment, but can also be applied to other similar industrial scenarios, such as logistics sorting, commodity inspection, etc. By simply adjusting the parameters and models, this method can adapt to different application requirements, demonstrating its wide applicability and application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the module of the artificial intelligence identification method of cigarette inventory of the present invention; Figure 2 A schematic diagram of the process of constructing a cigarette end robust recognition model of the present invention; Figure 3 It is a working principle diagram of the intra-cluster voting mechanism of the present invention; Figure 4 This is a working principle diagram of the dynamic clustering and merging of the present invention; Figure 5 A flow chart of the artificial intelligence identification method for cigarette inventory of the present invention; DETAILED DESCRIPTION

[0035] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below; It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0036] For those skilled in the art, it can be further appreciated that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0037] Embodiment 1: Figure 1 and Figure 5 As shown, an artificial intelligence identification method for cigarette inventory includes the following steps: S100, obtaining warehouse image data, and obtaining corresponding feature vectors and bounding boxes by detecting and identifying the warehouse image data; S200, constructing a warehouse image data grid model, wherein the grid model includes a grid prediction bounding box module and a category information recognition module; wherein the warehouse image data grid model includes a YOLO target detection algorithm for detecting cigarette ends; S300, extracting image features through a convolutional neural network according to the grid prediction bounding box and category information; S400, constructing a cigarette end robust recognition model, the cigarette end robust recognition model is used for robust recognition of cigarette ends in a storage environment, wherein the cigarette end robust recognition model is used to perform feature vector normalization, similarity matrix calculation, distance matrix calculation, preliminary clustering, cluster merging, and voting decision; S500, by adjusting the scores and filtering the recognition results in the images with low quality assessment scores, finally obtaining the result and score of cigarette end recognition.

[0038] In this embodiment, specifically: the detection and recognition of the warehouse image data to obtain the corresponding feature vector and bounding box specifically includes: Image input: extracting a storage environment image I as input from the warehouse image data, which contains a plurality of cigarette ends N; Bounding box detection B: Use the detection algorithm to identify the cigarette ends in the storage environment image I and obtain the position bounding box B of each cigarette end i ; Feature extraction V: Through preprocessing and feature extraction algorithm F, each position bounding box B i The image region corresponding to the bounding box region is converted into a feature vector; Bounding Box Detection: ; in, ; Feature extraction: ; in, ; in, I is the input storage environment image; D is a detection algorithm that outputs a set of bounding boxes B, where each bounding box B i is a four-tuple containing two-dimensional coordinates (x i ,y i ), width w i and height h i ; N is the number of cigarette ends detected; F is a feature extraction algorithm that receives a bounding box B i As input, and output a d-dimensional feature vector V i ; d is the dimension of the feature vector; V is the set of feature vectors extracted from all bounding boxes.

[0039] In this embodiment, specifically: in S200, the YOLO target detection algorithm specifically includes: Input image: adjust the input storage environment image to a fixed size; Feature extraction: Extract image features from warehouse environment images adjusted to a fixed size through a grid model; Bounding box prediction: The grid model outputs the bounding box and confidence score of each grid cell based on the image features; For each grid cell, YOLO outputs the following predictions: ; in, is the confidence that the bounding box contains the object; is the offset of the bounding box center relative to the grid cell; are the width and height of the bounding box, relative to the entire image; is the conditional probability of several groups of categories; Non-maximum suppression (NMS): Filter out bounding boxes with high overlap and retain the boxes with the highest confidence.

[0040] The category information includes positioning loss, confidence loss and classification loss; The positioning loss is formulated as follows: ; in, is an indicator variable, which takes the value of 1 when the jth bounding box of the i-th grid cell contains the object, otherwise it takes the value of 0; is the ground-truth bounding box parameter; are the predicted bounding box parameters; The confidence loss is formulated as follows: ; in, is an indicator variable, which takes the value of 1 when the jth bounding box of the i-th grid cell does not contain the object; is a weight parameter; The classification loss is formulated as follows: ; in, is the true probability of category c in the i-th grid cell; is the predicted probability of category c in the ith grid cell.

[0041] In this embodiment, specifically: in S300, the step of obtaining the image features of the cigarette end specifically includes: Convolutional layer: extracting local features of the cigarette end image through multiple convolutional layers; Pooling layer: The dimension of the feature map is reduced through the pooling layer; Fully connected layer: The feature map after convolution and pooling is converted into a feature vector through the fully connected layer, and the feature vector is normalized; The convolution layer is used to extract local features of the image. The formula for the convolution operation is as follows: ; Among them, F i,j,k is the value of the kth channel of the output feature map at position (i, j); I is the input image, size is H×W×C; K is the convolution kernel, with a size of M×N×C×K; M and N are the height and width of the convolution kernel, C is the number of channels of the input image, and K is the number of channels of the output feature map.

[0042] The pooling layer is used to reduce the dimension of the feature map. The formula is as follows: ; Among them, F i,j,k is the value of the kth channel at position (i, j) of the feature map after pooling; s is the pooling stride.

[0043] Example 2: Please refer to Figure 2 Based on S1000 to S300 of the first embodiment, this embodiment further introduces step S400, wherein the feature vector normalization is performed on the extracted feature vector, including: For a feature vector , the L2 normalized feature vector The calculation formula is: ; where X is the original eigenvector, is the L2 norm of X, and n is the dimension of the feature vector.

[0044] In this embodiment, specifically: in S400, the similarity matrix is ​​calculated by calculating the dot product between the feature vectors to obtain the similarity matrix. Given two feature vectors V i and V j , cosine similarity s ij It is expressed as: ; Among them, the dot product (Vi ×V j ) is the sum of the products of corresponding elements of two vectors, that is: ; and They are vector V i and V j The length of ; ; Construct a similarity matrix S, where each element s ij represents the cosine similarity between the i-th eigenvector and the j-th eigenvector, and the similarity matrix S is expressed as: ; Among them, the elements s on the diagonal ii Usually it is 1, the angle between any vector and itself is 0 degrees, and the cosine value is 1.

[0045] Example Given a python program to define it, for reference only: import numpy as np def calculate_distance_matrix(center_points): Calculate the distance matrix :param center_points: center point coordinates, (n, 2), np.float The center point coordinates of each detection box (x, y) :return: normalized distance matrix, (n, n), np.float # 1. Calculate the distance matrix between center points # Use scipy.spatial.distance.pdist to calculate pairwise Euclidean distances # pdist returns a compressed distance matrix box_ct_dis = pdist(center_points) # 2. Convert the compressed distance matrix into a square matrix # Use scipy.spatial.distance.squareform for conversion dis_mat = squareform(box_ct_dis) # 3. Normalize the distance matrix # Calculate the L2 norm of each row dis_mat_L2 = np.linalg.norm(dis_mat, axis=1, keepdims=True) # Normalize the distance matrix to ensure consistency when calculating similarity dis_mat = dis_mat / dis_mat_L2 # 4. Return the normalized distance matrix return dis_mat # Example Usage center_points = np.array([ [35, 35], # Center point 1 [90, 97.5], # Center point 2 [147.5, 150] # Center point 3 ]) distance_matrix = calculate_distance_matrix(center_points) print("Normalized distance matrix:\n", distance_matrix).

[0046] In this embodiment, specifically: in S400, the distance matrix calculation, calculating the distance matrix according to the center point position of the detection frame, includes: Given the center coordinates of the two detection boxes Ci=(x i , y i ) and Cj=(x j , y j ), use the Euclidean distance to calculate the distance between the center points of the two detection boxes: ; Each element d ij Represents the distance between the i-th detection box and the j-th detection box. The distance matrix D is expressed as: ; Among them, the elements on the diagonal d ii Usually 0; Normalized distance matrix D norm It is expressed as: ; Among them, max(D) is the maximum element in the distance matrix D.

[0047] In this embodiment, specifically: in S400, the preliminary clustering classifies the feature vectors whose similarity is greater than the historical single threshold into one category, and each feature vector belongs to a preliminary cluster group C; Initialize clustering set ; Where M is initialized to N, that is, each feature vector initially belongs to a cluster alone. All feature vectors are assigned to clusters to obtain a cluster set.

[0048] Example 3: Please refer to Figure 3-Figure 4 Based on S1000 to S400 of the first embodiment, this embodiment further introduces step S500. In the S400, the cluster merging checks and merges overlapping cluster sets, and merges the cluster sets with intersections into one group through set operations; The voting decision: In each cluster group, the expected cigarette ID is selected through a voting mechanism, the weight sum of each ID in the group is calculated, and the weight is sorted, and the ID with the first weight ranking is selected as the final ID of the group. The weight sum of each cigarette ID is calculated including: ; Among them, W i is the i-th row of the weight matrix W, i.e., the weight vector of the i-th eigenvector, l i =k means that the i-th eigenvector is assigned to cluster k.

[0049] In this embodiment, specifically: in S500, the score adjustment dynamically adjusts the recognition score. If the recognition score of an image is lower than a threshold, it is identified as unknown. A quality assessment mechanism is introduced to perform quality assessment on a single image, and the recognition results in images with low quality assessment scores are filtered out.

[0050] Dynamic cluster merging Suppose we have three cigarette ends 1, 2 and 3: End 1 and End 2 have a high similarity.

[0051] Terminal 2 and Terminal 3 have a high similarity.

[0052] However, the direct similarity between terminal 1 and terminal 3 is not high.

[0053] In our example, end 1 and end 2 are in one cluster group, and end 2 and end 3 are in another cluster group. Because end 2 is a common member, the two cluster groups are merged into one cluster group. Finally, end 1 and end 3 are indirectly associated with each other through end 2 to form a new cluster group. Through this dynamic cluster merging process, even if end 1 and end 3 have no direct similarity in the preliminary clustering, they can eventually be merged with each other through the indirect association of end 2 to achieve a more accurate clustering result.

[0054] Merge Clusters When deciding to merge clusters C i and C j , we can simply take the union: ; Cluster C i and C j The similarity of is greater than or equal to the merge threshold, and remove C from the cluster set (C) i and C j , and add the merged cluster C ij .

[0055] In-cluster voting mechanism Assume that a cluster group has the following members and their identification results: Member A: ID is 1, recognition score is 0.9; Member B: ID is 2, recognition score is 0.85; Member C: ID is 1, recognition score is 0.95; 1. Initialize voting: Create an empty dictionary weight_sum = {}.

[0056] 2. Cumulative weight: Member A votes, and the dictionary is updated to weight_sum = {1: 0.9}.

[0057] Member B votes, and the dictionary is updated to weight_sum = {1: 0.9, 2: 0.85}.

[0058] Member C votes, and the dictionary is updated to weight_sum = {1: 1.85, 2: 0.85}; (the cumulative weight of ID 1 is 0.9 + 0.95).

[0059] 3. Select the highest weight ID: ID 1 has the highest cumulative weight (1.85), so the final identification ID of this cluster group is 1.

[0060] 4. Score adjustment and processing of low quality images: Set the identification ID of all members to 1.

[0061] If the recognition scores of some members are below the threshold, their scores are adjusted to the merge threshold.

[0062] Create an empty dictionary weight_sum to store the cumulative weight for each ID: ; For each member i, its ID is ID i And the recognition score is score i , update the cumulative weights in the weight_sum dictionary: ; If ID i If not in weight_sum, it is initialized to score i : ; Find the ID with the highest weight in weight_sum: ; For each member i, set its identification ID to : ; The recognition score of a member i If the score is lower than a certain threshold, its score is adjusted to the merge threshold t merg Typically, the merge threshold is used for cluster merging, but here it can be set to some default value or fixed score to represent the fraction of low-quality images: ; t score and t merg It is a threshold set according to specific needs.

[0063] The above embodiments only express the implementation methods of the relevant practical applications of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. An artificial intelligence identification method for cigarette inventory, characterized in that: The following steps are involved: S100, obtaining warehouse image data, and obtaining corresponding feature vectors and bounding boxes by detecting and identifying the warehouse image data; S200, constructing a warehouse image data grid model, wherein the grid model includes a grid prediction bounding box module and a category information recognition module; wherein the warehouse image data grid model includes a YOLO target detection algorithm for detecting cigarette ends; S300, extracting image features through a convolutional neural network according to the grid prediction bounding box and category information; S400, constructing a cigarette end robust recognition model, the cigarette end robust recognition model is used for robust recognition of cigarette ends in a storage environment, wherein the cigarette end robust recognition model is used to perform feature vector normalization, similarity matrix calculation, distance matrix calculation, preliminary clustering, cluster merging, and voting decision; S500, by adjusting the scores and filtering the recognition results in the images with low quality assessment scores, finally obtaining the result and score of cigarette end recognition.

2. The artificial intelligence identification method for cigarette inventory according to claim 1, characterized in that: The detecting and identifying of the warehouse image data to obtain the corresponding feature vector and bounding box specifically includes: Image input: extracting a storage environment image I as input from the warehouse image data, which contains a plurality of cigarette ends N; Bounding box detection B: Use the detection algorithm to identify the cigarette ends in the storage environment image I and obtain the position bounding box B of each cigarette end i ; Feature extraction V: Through preprocessing and feature extraction algorithm F, each position bounding box B i The image region corresponding to the bounding box region is converted into a feature vector.

3. The artificial intelligence identification method for cigarette inventory according to claim 1, characterized in that: In S200, the YOLO target detection algorithm specifically includes: Input image: adjust the input storage environment image to a fixed size; Feature extraction: Extract image features from warehouse environment images adjusted to a fixed size through a grid model; Bounding box prediction: The grid model outputs the bounding box and confidence score of each grid cell based on the image features; The category information includes positioning loss, confidence loss and classification loss.

4. The artificial intelligence identification method for cigarette inventory according to claim 1, characterized in that: In the S300, the image features specifically include: Convolutional layer: extracting local features of the cigarette end image through multiple convolutional layers; Pooling layer: The dimension of the feature map is reduced through the pooling layer; Fully connected layer: The feature map after convolution and pooling is converted into a feature vector through the fully connected layer, and the feature vector is normalized.

5. The artificial intelligence identification method for cigarette inventory according to claim 1, characterized in that: In the step S400, the feature vector is normalized, and the extracted feature vector is normalized, including: for a feature vector , the L2 normalized feature vector .

6. The artificial intelligence identification method for cigarette inventory according to claim 1, characterized in that: In the S400, the similarity matrix is ​​calculated by calculating the dot product between the eigenvectors to obtain the similarity matrix. Given two eigenvectors V i and V j ; Construct a similarity matrix S, where each element s ij represents the cosine similarity between the i-th eigenvector and the j-th eigenvector.

7. The artificial intelligence identification method for cigarette inventory according to claim 1, characterized in that: In the S400, the distance matrix calculation, which calculates the distance matrix according to the center point position of the detection frame, includes: Given the center coordinates of the two detection boxes Ci=(x i , y i ) and Cj=(x j , y j ), use Euclidean distance to calculate the distance between the center points of two detection boxes; Normalized distance matrix D norm .

8. The artificial intelligence identification method for cigarette inventory according to claim 1, characterized in that: In the S400, the preliminary clustering classifies the feature vectors whose similarity is greater than a historical single threshold into one category, and each feature vector belongs to a preliminary cluster group C; Each eigenvector initially belongs to a cluster individually, and all eigenvectors are assigned to clusters to obtain a cluster set.

9. The artificial intelligence identification method for cigarette inventory according to claim 8, characterized in that: In the S400, the cluster merging checks and merges overlapping cluster sets, and merges the cluster sets with intersections into one group through set operations; The voting decision: In each cluster group, the expected cigarette ID is selected through a voting mechanism, the weight sum of each ID in the group is calculated and sorted, and the ID with the first weight ranking is selected as the final ID of the group, and the weight sum of each cigarette ID is calculated.

10. The artificial intelligence identification method for cigarette inventory according to claim 1, characterized in that: In S500, the score adjustment dynamically adjusts the recognition score. If the recognition score of an image is lower than a threshold, it is identified as unknown. A quality assessment mechanism is introduced to perform quality assessment on a single image and filter the recognition results in images with low quality assessment scores.

Citation Information

Patent Citations

  • Method for clustering images

    CN108647726A

  • Traditional Chinese medicine decoction part small package target detection and recognition method and system

    CN113869413A

  • Unsupervised face image secondary clustering method and device, and medium

    CN113920353A

  • Cigarette retailer inventory checking method and system

    CN115063084A

  • Glass container quality detection method based on AI deep learning technology

    CN116563260A