Commodity type identification method and device, computer equipment and readable storage medium

By performing geometric correction and feature extraction on product image data, combined with reference feature vector matching, the problem of high cost of new SKU identification in traditional methods is solved, and accurate and low-cost product category identification is achieved.

CN121962582APending Publication Date: 2026-05-01BEIJING LANGKE INTELLIGENT COMPUTING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610096866.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-23
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional fully supervised classification schemes require retraining the model when identifying new product SKUs, resulting in high category identification costs.

Method used

By acquiring the initial image data of the product to be identified, geometric correction and product feature extraction are performed to obtain the target feature vector, which is then matched with the reference feature vector to determine the product category. When adding a new SKU, only the reference feature vector needs to be updated.

Benefits of technology

It enables accurate identification of product types, reduces the cost of identifying new SKUs, and expands application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962582A_ABST
    Figure CN121962582A_ABST
Patent Text Reader

Abstract

The invention relates to a commodity type identification method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring initial image data of a to-be-identified commodity, and determining commodity image data from the initial image data; performing geometric correction processing on the commodity image data to obtain corrected image data; performing commodity feature extraction on the corrected image data to obtain a target feature vector; and determining a target commodity type corresponding to the initial image data according to the target feature vector and the reference feature vector. By adopting the method, the category identification cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition technology, and in particular to a product category identification method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] In various industries, including product management, retail supervision, and market inspection, SKU (Stock Keeping Unit) identification refers to the accurate classification and identification of products in videos or images based on dimensions such as brand, series, and specifications. Its core objective is to achieve automated and high-precision identification of massive amounts of product SKUs. Here, SKU represents the smallest sales unit of a product. A single product, as the smallest sales unit, can have different flavors, representing different SKUs. For example, cigarettes of the same brand may have different flavors such as flue-cured, blended, and sun-cured, each with a different SKU code. With the accelerating pace of brand iteration and the continuous emergence of new product categories, the limitations of traditional fully supervised classification schemes are becoming increasingly apparent.

[0003] Traditional fully supervised classification schemes train neural networks and other models using a large dataset of labeled product SKUs, enabling the models to learn features such as color, texture, and logo (identification) of different product packaging types. However, adding new product SKUs requires retraining the model, resulting in high costs for category identification. Summary of the Invention

[0004] Therefore, it is necessary to provide a product category identification method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can reduce the cost of category identification in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a method for identifying product categories, including:

[0006] Acquire initial image data of the product to be identified, and determine product image data from the initial image data;

[0007] The product image data is subjected to geometric correction processing to obtain corrected image data;

[0008] Product features are extracted from the corrected image data to obtain the target feature vector;

[0009] Based on the target feature vector and the reference feature vector, the target product category corresponding to the initial image data is determined.

[0010] In one embodiment, determining the product image data from the initial image data includes:

[0011] Determine the region of interest from the initial image data;

[0012] The target in the region of interest is identified using a classification model to obtain the classification result;

[0013] If the classification and identification result is the target product, product image data is obtained based on the region of interest.

[0014] In one embodiment, determining the region of interest from the initial image data includes:

[0015] Identify the foreground region in the initial image data and determine the foreground region as the region of interest.

[0016] In one embodiment, the geometric correction processing of the product image data to obtain corrected image data includes:

[0017] Obtain key feature points from the product image data;

[0018] The shape of the region formed by the key feature points is geometrically corrected to the target shape to obtain corrected image data.

[0019] In one embodiment, the step of extracting product features from the corrected image data to obtain a target feature vector includes:

[0020] Based on the initial position of the corrected image data, the corrected image data is rotated to obtain corrected image data at multiple preset angles;

[0021] Product features are extracted from the corrected image data at each preset angle to obtain the target feature vector corresponding to the preset angle.

[0022] In one embodiment, determining the target product category corresponding to the initial image data based on the target feature vector and the reference feature vector includes:

[0023] The target feature vector is matched sequentially with reference feature vectors in the feature library, and the reference product category corresponding to the reference feature vector that matches the target feature vector is taken as the target product category corresponding to the initial image data.

[0024] Secondly, this application also provides a product category identification device, comprising:

[0025] The image data acquisition module is used to acquire initial image data of the product to be identified, and to determine product image data from the initial image data;

[0026] A geometric correction processing module is used to perform geometric correction processing on the commodity image data to obtain corrected image data;

[0027] The product feature extraction module is used to extract product features from the corrected image data to obtain a target feature vector;

[0028] The product category determination module is used to determine the target product category corresponding to the initial image data based on the target feature vector and the reference feature vector.

[0029] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the commodity category identification method provided in the first aspect.

[0030] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the commodity type identification method provided in the first aspect.

[0031] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the commodity category identification method provided in the first aspect.

[0032] The aforementioned product category identification method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire initial image data of the product to be identified, determine product image data from the initial image data, perform geometric correction processing on the product image data to obtain corrected image data, extract product features from the corrected image data to obtain a target feature vector, and determine the target product category corresponding to the initial image data based on the target feature vector and a reference feature vector. This enables accurate identification of product categories, and when adding new product categories, only the reference feature vector corresponding to the new product category needs to be added for identification, which can reduce the identification cost of new product categories and broaden the application scenarios of product category identification. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is an application environment diagram of the product category identification method in one embodiment;

[0035] Figure 2 This is a flowchart illustrating a product category identification method in one embodiment;

[0036] Figure 3 This is a schematic diagram of the cigarette type identification process in one embodiment;

[0037] Figure 4 This is a structural block diagram of a product category identification device in one embodiment;

[0038] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0040] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0041] The product category identification method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Server 104 can obtain the initial image data of the product to be identified sent by terminal 102. Server 104 determines the product image data from the initial image data, performs geometric correction processing on the product image data to obtain corrected image data, extracts product features from the corrected image data to obtain a target feature vector, and determines the target product category corresponding to the initial image data based on the target feature vector and a reference feature vector. Server 104 can return the determined target product category to terminal 102. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. It should be noted that the product category identification method provided in this application embodiment is not only applicable to the above-mentioned application scenarios involving terminal-server interaction, but also to application scenarios involving a single server, a single terminal, server-to-server interaction, or terminal-to-terminal interaction.

[0042] In one exemplary embodiment, such as Figure 2 As shown, a product category identification method is provided, which can be applied to... Figure 1 Taking the server in the example, the explanation includes the following steps 202 to 208. Wherein:

[0043] Step 202: Obtain the initial image data of the product to be identified, and determine the product image data from the initial image data.

[0044] The product to be identified can be any type of product, such as cigarettes, clothing, or electronics. The initial image data is the raw image data of the product to be identified captured by the camera. Product image data refers to image data containing only the target product, which is the specific type of product that needs to be identified in the current situation. In practical applications, the initial image data captured by the camera may include other objects or background information besides the target product. Therefore, it is necessary to determine the product image data containing only the target product from the initial image data. For example, the target product could be cigarettes, which can be any type of cigarette—a single cigarette, a pack of cigarettes, a carton of cigarettes, or a box of cigarettes. In other words, the server can identify the type of cigarette—a single cigarette, a pack of cigarettes, a carton of cigarettes, or a box of cigarettes—and the specific identification unit can be set according to the actual application scenario.

[0045] For example, product feature recognition can be performed on the initial image data to obtain the product feature recognition results in the initial image data. Based on the product feature regions in the product feature recognition results, product image data can be determined. For instance, the image data corresponding to the product feature regions in the initial image data can be determined as product image data. Alternatively, if the initial image data meets the conditions for product image data, the initial image data can also be directly determined as product image data.

[0046] Step 204: Perform geometric correction processing on the product image data to obtain corrected image data.

[0047] Geometric correction processing refers to the process of correcting the geometric shape of the product carrier in product image data. The product carrier typically refers to the product packaging box. For example, if the product is cigarettes, the product carrier could be the cigarette sticks or the cigarette box. The cigarette box refers to the cigarette packaging box, which could be the box for a pack of cigarettes, a carton of cigarettes, or a case of cigarettes. The product carrier can also be understood as the product itself. In practical applications, cameras may capture product images from different angles. Due to factors such as geometric distortion of the camera imaging system and projection distortion caused by the shooting environment, the shape of the product carrier in the obtained product image data may appear skewed or deformed. Therefore, it is necessary to correct the geometric shape of the product carrier in the product image data to a normal, standard shape. Corrected image data refers to product image data whose geometric shape has been corrected.

[0048] For example, the shape of the region formed by key feature points in a product image can be geometrically corrected to obtain corrected image data. For instance, the shape of the region formed by key feature points may originally be rectangular, but due to shooting or environmental factors, the shape of the region formed by key feature points may be skewed or distorted. In this case, the shape of the region formed by key feature points needs to be geometrically corrected to a rectangle to obtain corrected image data.

[0049] In one example, geometric correction is performed on product image data to obtain corrected image data. The shape of the region formed by key feature points in the corrected image data is the target shape. The target shape can be determined based on the selected key feature points, and the selection of key feature points is related to the type of product. For example, if the product is a cigarette, the key feature points selected are those of a cigarette, and the target shape might be a rectangle, a circle, etc.; if the product is a cigarette box, the key feature points selected are those of the cigarette box, and the target shape might be a rectangle, and so on. In practical applications, geometric correction can be performed on product image data based on the principles of affine transformation or projective transformation to obtain corrected image data. The specific correction method is not limited here and can be selected according to the actual application scenario.

[0050] Step 206: Extract product features from the corrected image data to obtain the target feature vector.

[0051] This process involves extracting product features from the corrected image data, including extracting information such as text, patterns, and colors, and then normalizing this information to obtain the corresponding target feature vector. The target feature vector is a feature vector used to represent product information in the corrected image data.

[0052] For example, the corrected image data can be rotated to obtain corrected image data from multiple angles, and product features can be extracted from the corrected image data from each angle to obtain the target feature vector corresponding to the corresponding angle.

[0053] Step 208: Determine the target product category corresponding to the initial image data based on the target feature vector and the reference feature vector.

[0054] The reference feature vector is a feature vector used to represent standard product information. Reference feature vectors can be stored in a feature library, which typically contains reference feature vectors for multiple product types; different product types have different reference feature vectors. In other words, there is a one-to-one mapping relationship between product types and reference feature vectors.

[0055] For example, the obtained target feature vector can be matched with the reference feature vector in the feature library, and the product category corresponding to the reference feature vector that matches the target feature vector can be used as the target product category corresponding to the initial image data.

[0056] In practical applications, if a new product category is added, the reference feature vector corresponding to the new product category can be added to the feature library, and the corresponding product category can be determined based on the product category identification method in this embodiment.

[0057] In one example, if the target feature vector includes multiple vectors, such as target feature vectors corresponding to corrected image data from multiple angles, the target feature vector corresponding to each angle can be matched with reference feature vectors in the feature library. The product category corresponding to the matching reference feature vector is taken as the target product category for that angle. Then, the product category with the highest frequency of occurrence among the target product categories corresponding to each angle is taken as the target product category for the initial image data. Alternatively, the similarity between the target feature vector corresponding to each angle and the matching reference feature vector can be determined, and the product category corresponding to the matching reference feature vector with the highest similarity among the target feature vectors corresponding to each angle is taken as the target product category for the initial image data.

[0058] In the above-mentioned product category identification method, the initial image data of the product to be identified is obtained, and the product image data is determined from the initial image data. The product image data is then geometrically corrected to obtain corrected image data. Product features are extracted from the corrected image data to obtain a target feature vector. Based on the target feature vector and the reference feature vector, the target product category corresponding to the initial image data is determined. This method can accurately identify product categories. Furthermore, when adding new product categories, only the reference feature vector corresponding to the new product category needs to be added for identification, which can reduce the identification cost of new product categories and broaden the application scenarios of product category identification.

[0059] In some embodiments, determining the product image data from the initial image data in step 202 includes:

[0060] The region of interest (ROI) is determined from the initial image data; the target in the ROI is identified using a classification model to obtain the classification result; if the classification result is the target product, the product image data is obtained based on the ROI.

[0061] In this context, the Region of Interest (ROI) refers to the area that requires focused attention. In this embodiment, the ROI is the region used for target identification. The classification model is the model used to identify the category of the target. The classification model can be obtained through training.

[0062] For example, the classification model is a binary classification model. The classification model is used to identify whether the target in the region of interest (ROI) is a target product category or a non-target product category; that is, the classification result includes both target and non-target product categories. The server determines the ROI from the initial image data, identifies the target within the ROI using the classification model, and obtains the classification result. If the classification result indicates a target product category, the image data corresponding to the ROI in the initial image data is used as the product image data.

[0063] For example, a foreground region in the initial image data can be identified and designated as the region of interest. Alternatively, the user can directly select a region from the displayed initial image data on the display interface, and the server, in response to the region selection operation, designates the selected region as the region of interest.

[0064] In this embodiment, by determining the region of interest from the initial image data, the target in the region of interest is identified by a classification model to obtain the classification result. If the classification result is the target product, the product image data is obtained based on the region of interest. This enables subsequent identification processes to be carried out while ensuring that the target in the image is the target product, reducing the possibility of identification errors and saving computing resources.

[0065] In some embodiments, determining the region of interest from initial image data includes:

[0066] Identify the foreground region in the initial image data and determine the foreground region as the region of interest.

[0067] In this context, the foreground region refers to the foreground portion of an image. The foreground is described relative to the background; in object segmentation tasks, the foreground is typically an independent object with complete semantics, rather than fragmented pixel geometry. For example, the foreground can be one or more complete instances, such as a cigarette, a pack of cigarettes, a cat, or a car. Foreground regions can be identified in the initial image data using foreground extraction methods, and then these foreground regions can be designated as regions of interest.

[0068] For example, a foreground region in the initial image data can be identified, a mask corresponding to the foreground region can be determined, and a region of interest can be segmented from the initial image data based on the mask. In other words, the region corresponding to the mask in the initial image data is the region of interest.

[0069] In this embodiment, by identifying the foreground region in the initial image data and determining the foreground region as the region of interest, the region of interest can be determined more accurately, thereby improving the accuracy of determining the product image data.

[0070] In some embodiments, step 204 involves geometric correction processing of the product image data to obtain corrected image data, including:

[0071] Obtain key feature points from the product image data; transform the shape of the region formed by the key feature points into the target shape through geometric correction to obtain corrected image data.

[0072] Key feature points refer to the key points that characterize the main features of a product image data. For example, taking cigarettes as an example, key feature points are those that characterize the features of the cigarette itself, or the features of the cigarette pack. The region formed by the key feature points is used to characterize the closed contour of the key features in the product image data. Accordingly, the shape of the region is the actual shape of the closed contour in the product image data. The target shape can be determined based on the product type in the product image data. For example, if the product type is cigarettes, the target shape may be a circle or a rectangle; if the product type is a cigarette pack, the target shape is a standard rectangle.

[0073] In practical applications, due to the variety of shooting angles, objects may exhibit perspective distortion in images. Directly using distorted images for category recognition can affect recognition accuracy. Therefore, it is necessary to geometrically correct the contours in the product image data to obtain corrected image data. For example, the shape of the region formed by key feature points can be geometrically corrected to the target shape based on at least one of affine transformation techniques, perspective transformation techniques, etc., to obtain corrected image data.

[0074] In one example, taking boxed cigarettes as the product, the server can obtain the key feature points of the cigarette box in the product image data, and then perform geometric correction processing on the shape of the area formed by the key feature points of the cigarette box, such as "stretching" it back to a standard rectangle, to obtain the corrected image data.

[0075] In this embodiment, by geometrically correcting the shape of the region formed by key feature points in the product image data to the target shape, corrected image data is obtained. This enables product category identification through more standardized product features, thereby improving the accuracy of product category identification.

[0076] In some embodiments, step 206 involves extracting product features from the corrected image data to obtain a target feature vector, including:

[0077] Based on the initial position of the corrected image data, the corrected image data is rotated to obtain corrected image data at multiple preset angles; features are extracted from the corrected image data at each preset angle to obtain the target feature vector corresponding to the preset angle.

[0078] The initial position of the corrected image data refers to the original position of the product in the captured image. Different products may have different initial positions. After determining the initial position of the corrected image data, it can be rotated in a preset direction from that position to obtain corrected image data at multiple preset angles. The preset angles or the number of preset angles can be set according to the actual application scenario. For example, preset angles include 0°, 90°, 180°, 270°, etc.

[0079] For example, the server can rotate the corrected image data by multiple preset angles in a clockwise or counterclockwise direction based on the initial position of the corrected image data to obtain corrected image data at multiple preset angles. Then, feature extraction is performed on the corrected image data at each preset angle to obtain the target feature vector corresponding to the preset angle. With the target feature vectors corresponding to multiple preset angles obtained, each target feature vector can be matched with a reference feature vector in a feature library to obtain a reference feature vector that matches the target feature vector at each preset angle. The matching degree between the target feature vector at each preset angle and the matching reference feature vector is determined. The product category corresponding to the reference feature vector with the highest matching degree among the target feature vectors at each preset angle is taken as the target product category corresponding to the initial image data.

[0080] In this embodiment, the corrected image data is rotated based on its initial position to obtain corrected image data at multiple preset angles. Feature extraction is performed on each preset angle of the corrected image data to obtain the target feature vector corresponding to the preset angle. This can improve the richness of the target feature vector, thereby improving the robustness and accuracy of product category recognition.

[0081] In some embodiments, step 208, determining the target product category corresponding to the initial image data based on the target feature vector and the reference feature vector, includes:

[0082] The target feature vector is matched sequentially with the reference feature vectors in the feature library. The reference product category corresponding to the reference feature vector that matches the target feature vector is taken as the target product category corresponding to the initial image data.

[0083] Matching degree can be used to determine whether a target feature vector matches a reference feature vector. In practical applications, the matching degree between the target feature vector and each reference feature vector in the feature library can be calculated sequentially. The reference feature vector with the highest matching degree among all matching degrees is taken as the reference feature vector that matches the target feature vector. Matching degree can be represented by similarity; the higher the similarity, the higher the matching degree; conversely, the lower the similarity, the lower the matching degree. Similarity can be represented by cosine similarity, Euclidean distance, Manhattan distance, or Mahalanobis distance, etc.

[0084] In an exemplary embodiment, if there are multiple target feature vectors, each target feature vector can be matched sequentially with reference feature vectors in the feature library to determine the reference feature vector that matches each target feature vector. The similarity between each target feature vector and its corresponding matching reference feature vector is calculated, and the reference product category corresponding to the reference feature vector with the highest similarity is taken as the target product category in the initial image data. For example, there are four target feature vectors: target feature vector A, target feature vector B, target feature vector C, and target feature vector D. The reference feature vector that matches target feature vector A is reference feature vector A', the reference feature vector that matches target feature vector B is reference feature vector B', the reference feature vector that matches target feature vector C is reference feature vector C', and the reference feature vector that matches target feature vector D is reference feature vector D'. The first similarity between target feature vector A and reference feature vector A', the second similarity between target feature vector B and reference feature vector B', the third similarity between target feature vector C and reference feature vector C', and the fourth similarity between target feature vector D and reference feature vector D' are determined sequentially. The highest similarity is then determined from the first, second, third, and fourth similarities. Assuming that the highest similarity is the second similarity, the reference product category corresponding to the reference feature vector B' with the second similarity is taken as the target product category corresponding to the initial image data.

[0085] In this embodiment, by sequentially matching the target feature vector with the reference feature vector in the feature library, the reference product category corresponding to the reference feature vector that matches the target feature vector is taken as the target product category corresponding to the initial image data. This allows for the rapid determination of the product category in the initial image data by matching it with the standard features in the feature library, thereby improving the efficiency of product category recognition.

[0086] In one example, taking cigarettes as an example, the flowchart for identifying cigarette types is as follows: Figure 3As shown, cigarette types can be characterized by SKUs. Initial image data is acquired, which can be video frame data captured from cigarette products or image data directly taken by a camera. An instance segmentation module performs instance segmentation on the initial image data, identifying cigarette targets (foreground regions) and outputting corresponding pixel-level masks. Based on these masks, the foreground product is precisely "matted" from the complex background, extracting a clean region of interest. In other words, the region of interest is segmented from the initial image data based on the mask. An interference filtering module performs target recognition within the region of interest, specifically using a lightweight binary classification model. If the target is identified as a cigarette, the geometric correction module continues processing; if it is identified as a non-cigarette, the recognition process terminates. The geometric correction module can extract the contour or key points (i.e. key feature points) in the region of interest. Based on affine transformation or perspective transformation techniques, it restores the contour in the region of interest to a standard rectangular shape, thus obtaining the corrected image data. The corrected image data is then enhanced with multi-angle features by rotating it clockwise by 90°, 180° and 270° in sequence to obtain the corrected image data at the corresponding angles.

[0087] The feature extraction module processes the corrected image data from various angles. For example, it uses a deep convolutional neural network trained on ArcFace (such as ResNet (residual network) or a variant of MobileNet) to extract high-dimensional feature vector sets from both unrotated and rotated corrected image data at various angles. ArcFace is a loss function optimized for feature extraction, aiming to enable the model to learn highly discriminative feature vectors that are compact within classes and separable between classes; it is a key "training criterion" for deep convolutional networks to extract high-quality features. ResNet is a classic deep convolutional neural network architecture that can extract richer, more abstract high-dimensional features by stacking deep networks, making it the preferred backbone network for "high accuracy first" in feature extraction tasks. MobileNet is a lightweight convolutional network designed specifically for mobile / edge devices, with the core goal of significantly reducing computation and parameter count while maintaining feature effectiveness. The feature retrieval module calculates the cosine similarity between each feature vector (i.e., the target feature vector) in the high-dimensional feature vector set and the standard features (i.e., the reference feature vector) in the SKU feature library. The feature matching result with the highest similarity is selected, and the SKU corresponding to the matching standard feature with the highest similarity is determined as the final cigarette SKU identification result.

[0088] The above example can support the identification of new cigarette types by updating the feature library without updating the parameters of the recognition model, thereby reducing the cost of identifying new cigarette types.

[0089] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0090] Based on the same inventive concept, this application also provides a product category identification device for implementing the product category identification method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more product category identification device embodiments provided below can be found in the limitations of the product category identification method described above, and will not be repeated here.

[0091] In one exemplary embodiment, such as Figure 4 As shown, a product category identification device 400 is provided, including: an image data acquisition module 402, a geometric correction processing module 404, a product feature extraction module 406, and a product category determination module 408, wherein:

[0092] The image data acquisition module 402 is used to acquire the initial image data of the product to be identified and to determine the product image data from the initial image data;

[0093] The geometric correction processing module 404 is used to perform geometric correction processing on the commodity image data to obtain corrected image data.

[0094] The product feature extraction module 406 is used to extract product features from the corrected image data to obtain the target feature vector;

[0095] The product category determination module 408 is used to determine the target product category corresponding to the initial image data based on the target feature vector and the reference feature vector.

[0096] In some embodiments, the image data acquisition module 402 is further configured to determine the region of interest from the initial image data; identify the target in the region of interest using a classification model to obtain a classification result; and, if the classification result is a target product, obtain product image data based on the region of interest.

[0097] In some embodiments, the image data acquisition module 402 is further configured to identify a foreground region in the initial image data and determine the foreground region as the region of interest.

[0098] In some embodiments, the geometric correction processing module 404 is further configured to acquire key feature points in the product image data; and to convert the shape of the region formed by the key feature points into a target shape through geometric correction processing to obtain corrected image data.

[0099] In some embodiments, the product feature extraction module 406 is further configured to rotate the corrected image data based on the initial position of the corrected image data to obtain corrected image data at multiple preset angles; and to extract features from the corrected image data at each preset angle to obtain the target feature vector corresponding to the preset angle.

[0100] In some embodiments, the product category determination module 408 is further configured to match the target feature vector with the reference feature vector in the feature library in sequence, and take the reference product category corresponding to the reference feature vector that matches the target feature vector as the target product category corresponding to the initial image data.

[0101] Each module in the aforementioned product category identification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0102] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data related to the product category identification method. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a product category identification method.

[0103] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0104] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0105] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0106] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0107] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0108] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0109] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0110] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for identifying product categories, characterized in that, The method includes: Acquire initial image data of the product to be identified, and determine product image data from the initial image data; The product image data is subjected to geometric correction processing to obtain corrected image data; Product features are extracted from the corrected image data to obtain the target feature vector; Based on the target feature vector and the reference feature vector, the target product category corresponding to the initial image data is determined.

2. The method according to claim 1, characterized in that, Determining the product image data from the initial image data includes: Determine the region of interest from the initial image data; The target in the region of interest is identified using a classification model to obtain the classification result; If the classification and identification result is the target product, product image data is obtained based on the region of interest.

3. The method according to claim 2, characterized in that, Determining the region of interest from the initial image data includes: Identify the foreground region in the initial image data and determine the foreground region as the region of interest.

4. The method according to claim 1, characterized in that, The geometric correction processing of the product image data to obtain corrected image data includes: Obtain key feature points from the product image data; The shape of the region formed by the key feature points is geometrically corrected to the target shape to obtain corrected image data.

5. The method according to claim 1, characterized in that, The step of extracting product features from the corrected image data to obtain a target feature vector includes: Based on the initial position of the corrected image data, the corrected image data is rotated to obtain corrected image data at multiple preset angles; Feature extraction is performed on the corrected image data for each preset angle to obtain the target feature vector corresponding to the preset angle.

6. The method according to claim 1, characterized in that, The step of determining the target product category corresponding to the initial image data based on the target feature vector and the reference feature vector includes: The target feature vector is matched sequentially with reference feature vectors in the feature library, and the reference product category corresponding to the reference feature vector that matches the target feature vector is taken as the target product category corresponding to the initial image data.

7. A product category identification device, characterized in that, The device includes: The image data acquisition module is used to acquire initial image data of the product to be identified, and to determine product image data from the initial image data; A geometric correction processing module is used to perform geometric correction processing on the commodity image data to obtain corrected image data; The product feature extraction module is used to extract product features from the corrected image data to obtain a target feature vector; The product category determination module is used to determine the target product category corresponding to the initial image data based on the target feature vector and the reference feature vector.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.