New Goods Category Discovery Method Based on Asymmetric Enhancement and Confidence Collaborative Learning

Through asymmetric enhancement and confidence collaborative learning methods, image views of different intensities are generated, which solves the insufficient identification of the intelligent electronic scale system in fine-grained and long-tail distribution, realizes automatic discovery and accurate classification of new goods, and improves the intelligence level and user experience of the system.

CN120236146BActive Publication Date: 2025-08-01XIAMEN UNIV OF TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510704591.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-01
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

The existing intelligent electronic scale system has insufficient fine-grained goods recognition capabilities, and cannot effectively identify new goods that have not been seen before, and has weak recognition capabilities for long-tail distribution, resulting in low recognition accuracy, affecting user experience and system adaptability.

Method used

A new product category discovery method based on asymmetric enhancement and confidence collaborative learning is adopted to enhance the model's adaptability to product appearance changes by generating image views of different intensities, and to use high confidence samples for collaborative learning to reduce noise interference, and build optimization strategies to balance the problem of uneven data distribution.

Benefits of technology

It significantly improves the model's identification accuracy of known goods and the ability to discover new goods, improves the robustness and adaptability of the system, and meets the application needs of the dynamic retail environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236146B_ABST
    Figure CN120236146B_ABST
Patent Text Reader

Abstract

The present invention provides a new product category discovery method based on asymmetric enhancement and confidence collaborative learning, which relates to the fields of computer vision and artificial intelligence technologies, aiming to improve its recognition ability for known and unknown products in a dynamic retail environment. This method generates image views with different intensities through an asymmetric data enhancement strategy to enhance the model's adaptability to product appearance changes. At the same time, a confidence-guided collaborative learning mechanism is adopted to dynamically utilize high-confidence samples in unlabeled data and reduce noise interference. In addition, aiming at the long-tail distribution problem of known categories, a Logit adjustment strategy is introduced to optimize the classification effect. By integrating multiple loss functions, a multi-task learning framework is constructed to achieve accurate recognition of known products and automatic discovery and clustering of unknown new products, significantly improving the intelligence level and practicality of intelligent electronic scales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of computer vision and artificial intelligence, and particularly to a method for discovering new product categories based on asymmetric enhancement and confidence collaborative learning. Background Art

[0002] With the digital transformation of the retail industry, the application of intelligent electronic scales has become increasingly widespread, becoming one of the key technologies to improve retail efficiency and user experience. Traditional electronic scales rely on manual operations to identify and classify goods, which is not only inefficient but also prone to errors. In recent years, the development of computer vision and deep learning technologies has provided new solutions for the intelligence of electronic scales, enabling fast settlement and pricing functions through automatic identification of goods images.

[0003] However, the existing intelligent electronic scale recognition systems still face many technical bottlenecks in practical applications. First of all, the fine-grained goods recognition ability of the existing systems is insufficient. In actual retail scenarios, there is a wide variety of goods, and even for the same type of goods, there may be significant differences due to factors such as variety, freshness, packaging, etc. For example, different varieties of apples (such as Fuji, Red Star, etc.) or vegetables with different freshness levels are often simply classified into the same category, resulting in the recognition accuracy not meeting the actual requirements. This deficiency in fine-grained recognition not only affects the user experience but may also cause inconvenience and losses to merchants in goods management.

[0004] Secondly, the generalization ability of the existing systems is weak. The distribution of retail goods shows an obvious long-tail characteristic, that is, a small number of common goods (such as ordinary vegetables and fruits) have a large number of samples, while many special or seasonal goods (such as imported fruits, local specialties, etc.) have a small number of samples. This imbalance in data distribution causes the performance of existing models to drop significantly when dealing with few-sample categories, restricting the actual application scope and adaptability of the system.

[0005] In addition, the existing intelligent electronic scale systems cannot effectively identify unseen new goods. The commodity market is constantly updated, and new goods appear frequently. However, the existing closed-set deep learning models can only identify the categories that already exist in the training set and cannot accurately identify newly emerging goods. This not only increases the maintenance cost of the system but also reduces the flexibility and adaptability of the system, failing to meet the dynamically changing market demands.

[0006] To solve these problems, extensive explorations have been carried out in the academic and industrial fields. Traditional methods mainly rely on technologies such as data augmentation, model compression, and transfer learning, but these methods have limited effects in dealing with the automatic discovery of new goods and the long-tail distribution problem. In recent years, certain progress has been made in the fields of open-set recognition and new class discovery, but most of these methods are designed for general object recognition and do not fully consider the particularities of goods recognition, such as fine-grained differences and long-tail distribution problems.

[0007] In view of this, the present application is proposed. Summary of the Invention

[0008] The present invention provides a new goods category discovery method based on asymmetric enhancement and confidence collaborative learning, which can at least partially improve the above problems.

[0009] To achieve the above object, the present invention adopts the following technical solutions:

[0010] A new goods category discovery method based on asymmetric enhancement and confidence collaborative learning, comprising:

[0011] Obtain a goods image to be recognized, and preprocess the goods image;

[0012] Call the trained new goods category discovery model to perform forward propagation processing on the preprocessed goods image, obtain the final classification Logits z, calculate the probability distribution according to the classification Logits z, select the corresponding category index, perform category judgment, and perform new goods category discovery and addition according to the category judgment result;

[0013] Before calling the trained new goods category discovery model to perform forward propagation processing on the preprocessed goods image, it further includes:

[0014] Construct a goods data set including labeled and unlabeled goods, and preprocess the goods data set to obtain a mixed data set as the input of the new goods category discovery model to be trained;

[0015] For the goods images in the mixed data set x Perform asymmetric data enhancement processing to generate a coarse-grained enhanced view v c and a fine-grained enhanced view v f ;

[0016] Adopt a preset shared feature extraction backbone network to perform feature extraction processing on the coarse-grained enhanced view v c and the fine-grained enhanced view v f to obtain the projected feature p and the classification Logits z;

[0017] Construct an overall optimization objective function, perform multi-task loss calculation processing based on the projected feature p and the classification Logits z to obtain the total loss result, and update the new goods category discovery model according to the total loss result until the output result of the model reaches the preset requirement, end the training, and obtain the trained new goods category discovery model.

[0018] In summary, in response to the demand for item recognition by intelligent electronic scales in dynamic retail environments, an innovative category discovery method is proposed. This method significantly improves the model's item recognition ability and the discovery efficiency of new categories through unique data augmentation and collaborative learning strategies. Specifically, by generating image views of different intensities, the adaptability of the model to item appearance changes is enhanced; at the same time, collaborative learning using high-confidence samples effectively reduces noise interference. In addition, to address the problem of unbalanced data distribution, an optimization strategy is introduced to further improve the model's robustness. Finally, this method not only improves the recognition accuracy of known items but also realizes the automatic discovery and classification of unknown new items, providing strong technical support for the wide application of intelligent electronic scales.

[0019] Compared with the prior art, the new item category discovery method based on asymmetric augmentation and confidence collaborative learning has the following advantages: (1) Through the asymmetric augmentation mechanism, this method generates view representations of different intensities for item images, enabling the model to simultaneously learn stable category discriminative features and robust generalization features, improving the discovery ability for unknown new item categories; (2) Based on the confidence-based collaborative feature learning mechanism, the similarity between high-confidence samples is effectively utilized to construct a high-quality learning neighborhood, reducing the noise impact caused by low-quality pseudo-labels and improving the feature learning quality; (3) The dynamic logit adjustment technique directly addresses the problem of class imbalance, making the model pay more attention to few-shot classes during the learning process, balancing the learning of high-frequency and low-frequency classes, and enhancing the model's adaptability to data with long-tail distributions; (4) The end-to-end training and inference framework, without the need for additional anomaly detection modules or post-processing steps, realizes efficient new item category discovery and meets the application requirements of real-time identification by electronic scales. Brief Description of the Drawings

[0020] Figure 1 is a schematic flowchart of the new item category discovery method based on asymmetric augmentation and confidence collaborative learning provided by an embodiment of the present invention;

[0021] Figure 2 is a framework diagram of the new item category discovery model provided by an embodiment of the present invention. Detailed Embodiments

[0022] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0023] Refer to Figure 1 、 Figure 2As shown in the figure, the first embodiment of the present invention discloses a new product category discovery method based on asymmetric enhancement and confidence collaborative learning, which can be executed by a new product category discovery device based on asymmetric enhancement and confidence collaborative learning (hereinafter referred to as the discovery device). Specifically, it is executed by one or more processors in the discovery device to implement the following method:

[0024] S1. Obtain the product image to be recognized and preprocess the product image;

[0025] Preferably, the preprocessing includes unified size processing and pixel value normalization processing. Among them, the unified size processing includes cropping processing and scaling processing.

[0026] Specifically, in this embodiment, the preprocessing mainly includes unified size processing and pixel value normalization processing. The unified size processing is to ensure that the images input into the model have a consistent format, thereby improving the processing efficiency and accuracy of the model. This process usually includes cropping processing and scaling processing. The cropping processing can remove unnecessary edge parts in the image, focus on the product itself, and reduce interference factors. The scaling processing adjusts the image to a fixed size required by the model to ensure the input consistency of the image in the model. Through these operations, the image has been optimized before entering the model, laying a good foundation for subsequent feature extraction and classification.

[0027] Among them, the pixel value normalization processing is to adjust the pixel value distribution of the image to make it more suitable for the input requirements of the model. The normalization processing can adjust the pixel values to a specific range, such as between 0 and 1, which helps to accelerate the training process of the model and improve the adaptability of the model to different lighting conditions and shooting environments. Through this preprocessing method, the model can more effectively learn and identify the features of the product, thereby improving the accuracy and robustness of the recognition.

[0028] S2. Call the trained new product category discovery model to perform forward propagation processing on the preprocessed product image, obtain the final classification Logits z, calculate the probability distribution according to the classification Logits z, select the corresponding category index for category judgment, and perform new product category discovery and addition according to the category judgment result.

[0029] Specifically, step S2 includes: calculating the probability distribution P according to the classification Logits z, and its formula is: P = softmax(z), where z is the final classification Logits z;

[0030] Screen out the category index pred_idx = argmax(P) with the highest probability corresponding to the probability distribution P, and perform category judgment according to the category index pred_idx with the highest probability;

[0031] Among them, if the category index pred_idx with the highest probability falls within the preset range of known category indices, the category judgment result is that the item is the corresponding known item. If the category index pred_idx with the highest probability falls within the preset range of unknown category indices, the category judgment result is that the item is a newly discovered item category;

[0032] For the newly discovered item category, after user confirmation, temporary ID assignment, and sample accumulation, it is officially added to the item database as the basis for subsequent item identification.

[0033] In this embodiment, after completing the preprocessing of the item image, the trained new item category discovery model is called to perform forward propagation processing on the preprocessed item image. This process is the core link for realizing item category recognition and discovery, and its efficiency and accuracy are directly related to the performance of the entire system. Specifically, after the model performs forward propagation processing on the preprocessed item image, it outputs the final classification Logits z. Based on this classification Logits z, the probability distribution P is further calculated; through the softmax function, the Logits are converted into a probability distribution, so as to evaluate the matching degree of each category with the input image in the form of probability. This conversion process not only provides a quantitative basis for category judgment, but also makes the output of the model more interpretable, facilitating subsequent analysis and processing.

[0034] Next, the category index with the highest probability is selected from the calculated probability distribution P. This index value corresponds to the item category that the model considers most likely. Through this screening process, the category judgment result of the model for the current item image can be quickly located, providing a direct basis for subsequent category judgment. Subsequently, category judgment is performed according to the category index with the highest probability. If the category index with the highest probability falls within the preset range of known category indices, then the category judgment result indicates that the item belongs to a known item category. In this case, the system can directly confirm the identity of the item and classify it into the corresponding known category, thus realizing fast and accurate item identification. This process significantly improves the processing efficiency of the system for common items, reduces unnecessary calculations and confirmation steps, and is of great significance for improving the settlement speed and user experience in the retail scenario.

[0035] If the index of the category with the highest probability falls within the preset range of unknown category indices, then the category judgment result indicates that the item belongs to a newly discovered item category. This discovery brings new challenges and opportunities to the system. For the newly discovered item category, the system will further trigger a series of subsequent processes, including user confirmation, assignment of a temporary ID, accumulation of samples, etc. First, through the user confirmation process, ensure that the newly discovered item category is accurately labeled and verified, avoiding interference caused by misjudgment to the system. Then, assign a temporary ID to the newly discovered item category to make it have a unique identifier in the system, facilitating subsequent management and identification. Finally, after accumulating a certain number of samples, add this new category to the item database formally as the basis for subsequent item identification. This process not only enriches the item database of the system, enabling it to adapt to the changing market environment, but also provides solid data support for the identification of new items, further enhancing the intelligence level and adaptability of the system.

[0036] Preferably, before performing forward propagation processing on the preprocessed item image by invoking the trained new item category discovery model, it further includes:

[0037] S01, construct a dataset of items including labeled and unlabeled items, and preprocess the item dataset to obtain a mixed dataset as the input of the new item category discovery model to be trained;

[0038] Specifically, step S01 includes: collecting images of the items already entered in the electronic scale, constructing a labeled dataset according to the images of the items already entered and their corresponding category labels, and counting the sample quantity distribution of each known category in the labeled dataset for subsequent Logit adjustment, where the categories corresponding to the images in the labeled dataset belong to known categories;

[0039] Collect images of items that are predicted to appear in the actual scenario and are not registered in the system or have unknown labels, and construct an unlabeled dataset, where the categories corresponding to the images in the unlabeled dataset include known categories and unknown new categories;

[0040] Preprocess the images in the labeled dataset and the unlabeled dataset. The preprocessing includes unified size processing and pixel value normalization processing to obtain a mixed dataset, where the unified size processing includes cropping processing and scaling processing.

[0041] In this embodiment, first, images of the goods already entered in the electronic scale are collected, and a labeled dataset is constructed based on these images and their corresponding category labels. The categories corresponding to the images in this dataset belong to known categories, that is, these goods have clear classifications and labels in the system. By statistically analyzing the sample quantity distribution of each known category in the labeled dataset, category frequency information can be obtained, and this information will be used in the subsequent Logit adjustment mechanism to optimize the model's learning effect on long-tail distribution data. This statistical process not only helps to balance the model's learning of known categories with different frequencies but also improves the overall recognition accuracy.

[0042] At the same time, it is also necessary to collect images of goods that may appear in the actual retail scenario but are not registered in the system or have unknown labels to construct an unlabeled dataset. The categories corresponding to the images in this dataset may include known categories and unknown new categories. These unlabeled images provide an important opportunity for the model to learn unknown categories, enabling the model to better adapt to the dynamically changing retail environment.

[0043] After constructing the labeled and unlabeled datasets, the images in these two datasets are uniformly preprocessed. The preprocessing process includes unified size processing and pixel value normalization processing. Unified size processing ensures that all images have a consistent size format through cropping and scaling operations. Cropping can remove unnecessary edge parts in the image, focus on the goods themselves, and reduce interference factors; scaling adjusts the image to the fixed size required by the model to ensure input consistency of the image in the model. Pixel value normalization processing is to adjust the pixel value distribution of the image to make it more suitable for the input requirements of the model. By adjusting the pixel values to a specific range, such as between 0 and 1, this processing method helps to accelerate the model training process and improve the model's adaptability to different lighting conditions and shooting environments.

[0044] S02. For the goods images in the mixed dataset x perform asymmetric data augmentation processing to generate a coarse-grained augmented view v c and a fine-grained augmented view v f ;

[0045] Specifically, step S02 includes: performing gentle data augmentation operations on the goods image x in the mixed dataset to generate a coarse-grained augmented view , maximizing the retention of the overall structure and main visual features of the goods to keep the main features of the goods unchanged;

[0046] performing drastic data augmentation operations on the goods image x in the mixed dataset to generate a fine-grained augmented view to increase the sample detail features.

[0047] Preferably, the mild data augmentation operations include: random horizontal flipping with a probability of 0.5, random rotation at a small angle with an angle of ±15°, and random cropping at a small scale, retaining 0.85 - 0.95 of the original image area; the severe data augmentation operations include: random horizontal flipping with a probability of 0.5, random rotation at a large angle with an angle of ±30°, random cropping at a large scale, retaining 0.6 - 0.9 of the original image area, random color jittering, random grayscaling, and Gaussian blur, where the random color jittering includes randomly changing the brightness, contrast, saturation, and hue.

[0048] In this embodiment, in order to improve the robustness of the model to the appearance changes of goods and learn richer features, for each goods image in the mixed dataset, an asymmetric data augmentation strategy is applied to generate two views with different intensities (coarse-grained and fine-grained views). First, mild data augmentation operations are performed to generate a coarse-grained augmented view. These mild data augmentation operations include random horizontal flipping with a probability of 0.5, random rotation at a small angle (angle of ±15°), and random cropping at a small scale (retaining 0.85 - 0.95 of the original image area). The purpose of these operations is to maximize the retention of the overall structure and main visual features of the goods while introducing a small amount of perturbation, ensuring that the main features of the goods are not deformed. In this way, the model can learn stable class discriminative features, thereby improving the recognition accuracy and robustness for known goods. Simply put, the coarse-grained view maintains the original appearance features of the goods, which helps the model learn stable class discriminative features.

[0049] Subsequently, severe data augmentation operations are performed on the same goods image to generate a fine-grained augmented view. The severe data augmentation operations include random horizontal flipping with a probability of 0.5, random rotation at a large angle (angle of ±30°), random cropping at a large scale (retaining 0.6 - 0.9 of the original image area), random color jittering, random grayscaling, and Gaussian blur. Among them, the random color jittering involves randomly changing the brightness, contrast, saturation, and hue of the image. The purpose of these operations is to simulate more complex real-world changes (viewpoint, illumination, occlusion) by introducing more variations, forcing the model to focus on local details and texture information and learn more discriminative and generalizable feature representations. This fine-grained augmented view can significantly improve the model's recognition ability for unknown new goods, especially when facing changes such as complex viewpoints, illumination, and partial occlusion.

[0050] Simply put, the generated multiple views { , } Passed to subsequent processing steps. The fine-grained view introduces more variations, prompting the model to learn more generalizable feature representations and enhancing its robustness to changes such as perspective, lighting, and partial occlusion. This asymmetric enhancement method significantly improves the model's adaptability to changes in the appearance of goods, especially its ability to recognize unknown new product categories.

[0051] Through this asymmetric enhancement mechanism, the model can learn feature representations of both global structure and local details simultaneously. This dual enhancement strategy not only improves the recognition accuracy of the model for known goods but also enhances its ability to discover unknown new goods. Specifically, the coarse-grained enhanced view helps the model learn stable category discriminative features, while the fine-grained enhanced view prompts the model to learn more generalizable feature representations, thereby enhancing its robustness to changes such as perspective, lighting, and partial occlusion. This asymmetric enhancement method significantly improves the model's adaptability to changes in the appearance of goods, especially when dealing with unknown new goods, enabling it to better capture their unique features and achieve more accurate recognition and classification.

[0052] In practical applications, the introduction of this asymmetric data enhancement strategy enables the intelligent electronic scale system to more flexibly handle changes in goods in a dynamic retail environment. Whether it is the high-precision recognition of known goods or the automatic discovery of unknown new goods, this strategy can provide strong technical support, significantly enhancing the system's intelligence level and user experience.

[0053] S03, using a preset shared feature extraction backbone network for the coarse-grained enhanced view v c and the fine-grained enhanced view v f to perform feature extraction processing, obtaining the projected feature p and the classification Logits z;

[0054] Specifically, step S03 includes: inputting the coarse-grained enhanced view v c and the fine-grained enhanced view v f into the preset shared feature extraction backbone network, processing each enhanced view to obtain the deep features v c corresponding to the coarse-grained enhanced view and the deep features v f corresponding to the fine-grained enhanced view , where the shared feature extraction backbone network is VisionTransformer;

[0055] Based on the projection head and classification head connected to the shared feature extraction backbone network, the deep features and the deep features Map it into a preset low-dimensional space to obtain projection features p and classification Logits z. The projection features p include coarse-grained enhanced views v c corresponding projection features and fine-grained enhanced views v f corresponding projection features .

[0056] In this embodiment, the coarse-grained enhanced view and the fine-grained enhanced view are input into a preset shared feature extraction backbone network. In the present invention, the selected shared feature extraction backbone network is Vision Transformer (ViT). Vision Transformer is a deep learning model based on the Transformer architecture. Compared with traditional convolutional neural networks (CNNs), it can better capture long-range dependencies and global features when processing image data, thus providing the model with more powerful feature extraction capabilities. By inputting two enhanced views with different intensities into Vision Transformer, the model can process each view separately and extract the corresponding deep features. In this way, for the coarse-grained enhanced view, its deep features are obtained, which retain the overall structure and main visual features of the goods; while for the fine-grained enhanced view, its deep features are obtained, which highlight the details and local texture information of the goods. These features capture the high-level semantic information of the image.

[0057] After obtaining the deep features, further use the projection head and classification head connected to the shared feature extraction backbone network to map these deep features into a preset low-dimensional space. The role of the projection head is to transform the features from the original space to a low-dimensional space suitable for contrast learning, so that the features of different views can be effectively compared and learned in this space. The classification head is responsible for mapping the features to the logits space for classification, providing input for the subsequent classification task. Through this mapping process, projection features p and classification logits z (Logits space for classification) are obtained. The projection features p include the projection features corresponding to the coarse-grained enhanced view and the projection features corresponding to the fine-grained enhanced view, which respectively represent the low-dimensional representations of the goods in terms of global and local features. Therefore, for each view, this step finally outputs its projection features p and classification Logits z.

[0058] Simply put, the confidence-guided collaborative feature learning mechanism means that after completing the above step S02, the enhanced view of the real-time goods image is input into the backbone network, and the goods category is directly recognized through the end-to-end classification head to obtain the logit distribution of each sample, and the model prediction value is used as the prediction confidence.

[0059] This feature extraction and mapping process based on the shared feature extraction backbone network not only enables the model to simultaneously learn the global structural features and local detailed features of the goods, but also provides an effective feature representation for subsequent contrast learning and classification tasks by mapping the features to a low-dimensional space. This design improves the recognition accuracy of the model for known goods while enhancing the model's ability to discover unknown new goods. By combining the learned global and local features, the model can better adapt to changes in goods images under conditions such as perspective, illumination, and partial occlusion, thereby improving the generalization performance and robustness of the model. In practical applications, this feature extraction and mapping mechanism can significantly enhance the goods recognition ability of the intelligent electronic scale system in a dynamic retail environment, providing strong technical support for the intelligent upgrade of the system.

[0060] S04. Construct an overall optimization objective function, perform multi-task loss calculation and processing based on the projection feature p and the classification Logits z to obtain the total loss result, and update the new goods category discovery model according to the total loss result until the output result of the model reaches the preset requirements, end the training, and obtain the trained new goods category discovery model.

[0061] Specifically, step S04 includes: constructing an overall optimization objective function , perform multi-task loss calculation and processing based on the overall optimization objective function, the projection feature p and the classification Logits z to obtain the total loss result, where and are both weight coefficients, is the self-distillation clustering loss, is the supervised classification loss based on Logit adjustment, is the unsupervised contrast loss, is the supervised contrast loss, is the confidence collaborative feature learning loss;

[0062] Update the new goods category discovery model according to the total loss result.

[0063] For the labeled samples and their corresponding views, use the number of samples of the known classes to adjust their classification Logits z, and calculate the supervised classification loss based on Logit adjustment. The formula is: , where is the logit value of the sample in the category , is the number of samples in the category , is the number of samples in the category , is the sample The logit value for the class , for all classes other than the current class y, is the temperature parameter;

[0064] Calculate the unsupervised contrastive loss for the projection features p of all views of all samples , where and are the feature representations of two different views of the same item, is the feature representation of any other sample in the batch, is the number of samples in each batch;

[0065] For the labeled samples and their views, calculate the supervised contrastive loss , where is the set of positive sample views of the same class as the sample , is the total number of samples in the training dataset;

[0066] Use the teacher-student framework for knowledge distillation to obtain the Logits z output by the student network and the target probability q output by the teacher network, and calculate the self-distillation clustering loss between the two , is the soft label that the sample obtained from the teacher model belongs to the class , , is the predicted probability corresponding to the student model, is the total number of classes predicted by the model (including known and unknown classes), is the logit output value of the student network for sample i on class j, is the temperature parameter in knowledge distillation, used to control the smoothness of the soft label, is the logit output value of the student network for sample i on class k;

[0067] According to the Logits z of all samples by the current model, calculate the predicted pseudo-labels and the corresponding predicted confidence , design a confidence-based collaborative feature learning mechanism to construct a sample neighborhood set: , where is the pseudo-label predicted by the model, is the predicted confidence, is the confidence threshold, is the predicted pseudo-label of sample j, is the predicted confidence of sample j, is the logits vector output by the model, is the temperature parameter used to calculate the confidence, which is used to control the smoothness of softmax;

[0068] Calculate the confidence collaborative feature learning loss according to the sample neighborhood set .

[0069] In this embodiment, step S04 is the core of model training. Based on the feature p and Logitsz obtained in step S03, a combined (multi-task) loss function is calculated to guide the model learning. This loss is composed of the following parts weighted:

[0070] First, the supervised classification loss with Logit adjustment , which is only for the long-tailed distribution of known classes; the Logits z is adjusted using the number of samples of known classes, and then the cross-entropy loss is calculated. This supervised classification loss based on Logit adjustment can effectively alleviate the data long-tailed distribution problem, making the model pay more attention to the few-shot classes during the learning process, thus balancing the learning of high-frequency and low-frequency classes and enhancing the model's adaptability to long-tailed distribution data. Among them, is the temperature parameter, which is used to adjust the influence degree of class frequency on classification.

[0071] The contrastive learning loss is used to promote the feature consistency of different views of the same item, which includes unsupervised contrastive loss and supervised contrastive loss. Second, the unsupervised contrastive loss applies the InfoNCE loss to the projected features p of all views of all samples, pulling closer the different views of the same item and pushing away the features of different items. Simply put, the unsupervised contrastive loss enhances the model's ability to distinguish item features by pulling closer the features of different views of the same item and pushing away the features of different items.

[0072] Third, the self-distillation clustering loss promotes feature clustering based on the teacher-student self-distillation framework. The student network outputs Logits z, and the teacher network (such as the momentum update version of the student network) outputs the target probability q (usually after sharpening); and the cross-entropy loss between them is calculated. Among them, this formula contains a temperature regulation mechanism, which decreases from the initial value (0.07) to the final value (0.04) through linear scheduling. The self-distillation clustering loss stabilizes the unsupervised clustering process through the teacher-student framework and further optimizes the feature representation of the model.

[0073] Fourthly, the confidence-guided collaborative feature learning loss. Based on the Logits z of all samples by the current model, the predicted pseudo-labels and the corresponding predicted confidence are calculated, and a confidence-based collaborative feature learning mechanism is designed to construct a sample neighborhood set. Among them, the method for constructing the neighborhood set enables high-confidence unlabeled samples to form effective pairs with labeled samples, and at the same time allows mutual learning relationships to form among high-confidence unlabeled samples. Based on the constructed neighborhood set, the collaborative feature learning loss is calculated, and this weighting ensures that the learning between labeled sample pairs is not affected by confidence, while the learning intensity of unlabeled samples participating is proportional to their predicted confidence, effectively reducing the noise introduced by low-quality pseudo-labels.

[0074] Finally, the overall optimization objective is constructed by combining the above loss functions, where the weight coefficients are used to balance the contributions of each loss term. Using this total loss, the parameters of the entire model (backbone network, projection head, classification head) are updated through backpropagation, enabling the model to gradually improve its performance in each iteration. Strategies such as cosine annealing learning rate, parameter group optimization, and early stopping can be adopted during the training process. The training process continues until the output result of the model reaches the preset requirements, at which point the training ends and a trained new product category discovery model is obtained.

[0075] This multi-task learning framework that combines multiple loss functions can not only effectively improve the recognition accuracy of the model for known products, but also significantly enhance the model's ability to discover unknown new products. Through the synergistic effect of the asymmetric enhancement mechanism, the confidence collaborative learning mechanism, and the Logit adjustment mechanism, the model can better adapt to the changes in products in a dynamic retail environment, improving the intelligence level and user experience of the intelligent electronic scale system.

[0076] Generally speaking, a feature representation learning framework under the Generalized Category Discovery (GCD) setting. GCD aims to simultaneously achieve accurate recognition of known goods and automatic discovery and clustering of unknown new goods from goods image data containing known categories (with annotations) and unknown categories (without annotations, possibly mixed with known categories). Different from traditional supervised learning, GCD requires the model to not only utilize limited annotated data but also mine information from unannotated data to infer and distinguish newly emerging goods categories in a semi-supervised manner. Based on this, the new goods category discovery method based on asymmetric augmentation and confidence collaborative learning constructs a comprehensive training framework: (1) Asymmetric view augmentation mechanism, by generating coarse-grained and fine-grained views with different intensities for the same goods image, forcing the model to learn a feature representation that is robust to illumination and perspective changes and takes into account both global structure and local details; (2) Confidence-guided collaborative feature learning mechanism, by calculating the prediction confidence of the model for unlabeled samples, dynamically constructing high-confidence positive sample pairs (including labeled-unlabeled and unlabeled-unlabeled sample pairs), and combining confidence-weighted calculation of collaborative contrast loss to effectively utilize unlabeled data information and suppress pseudo-label noise; (3) Logit adjustment mechanism for known categories, when calculating the supervised classification loss, adjusting its logit value according to the number of samples in the known category to alleviate the learning bias caused by the long-tailed distribution of data.

[0077] Specifically, the asymmetric view enhancement mechanism: To overcome the interference of the appearance diversity of product images (such as shape, texture, packaging details) on feature extraction, an asymmetric data augmentation strategy is designed. This mechanism generates two enhanced views with different intensities for the same product image: a coarse-grained view that maintains the overall structural information of the product through mild transformations, and a fine-grained view that mines more discriminative detailed features through stronger local transformations (focusing on key visual regions). This asymmetry helps the model learn feature representations that are robust to both global structures and local details, significantly improving the generalization and recognition ability for known product variants and unknown new products. Confidence-guided collaborative feature learning: To effectively utilize a large number of unlabeled product images and alleviate the problem of pseudo-label noise, a collaborative learning strategy based on the model prediction confidence is proposed. This strategy dynamically evaluates the model's prediction results for unlabeled samples and incorporates high-confidence prediction samples (regarded as reliable pseudo-labels) into the contrastive learning or supervised learning framework. Specifically, it allows high-confidence unlabeled samples to form positive sample pairs with labeled samples of the same category, or high-confidence unlabeled samples to form positive sample pairs based on consistent pseudo-labels for collaborative feature learning. Through confidence weighting, the interference of low-confidence predictions is reduced, thus enabling more reliable knowledge transfer from unlabeled data to the model representation and enhancing the ability to discover new categories. Logit adjustment mechanism for known categories: Considering that the product categories already entered in the electronic scale often exhibit a long-tail distribution in terms of sales frequency or the number of entries (the sample sizes of a few categories far exceed those of the majority of categories), a Logit adjustment strategy is introduced. When calculating the classification loss for known categories, this strategy adjusts the logit output of the model according to the prior information of the sample sizes of each known category, increasing the attention to low-frequency categories and suppressing the overfitting of the model to high-frequency categories. This helps balance the learning effects of the model on known categories with different frequencies, improving the overall recognition accuracy, and this adjustment does not affect the open discovery of unknown new categories.

[0078] In summary, the new product category discovery method based on asymmetric enhancement and confidence collaborative learning integrates these mechanisms into a multi-task learning framework, combines standard contrastive loss, supervised contrastive loss, and self-distillation clustering loss, and trains the feature representation model by optimizing the weighted total loss. Finally, the trained model can be deployed on the electronic scale. After inputting real-time product images, it can accurately identify known product categories and automatically discover and cluster previously unseen new product categories, significantly improving the intelligence level of the electronic scale and its adaptability to the dynamic commodity environment.

[0079] The above is the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art of this technology, without departing from the principle of the present invention, several improvements and refinements can still be made, and these improvements and refinements are also regarded as the protection scope of the present invention.

Claims

1. A new method for discovering new product categories based on asymmetric enhancement and confidence collaborative learning, characterized in that, Including: Obtain the image of the goods to be recognized, and preprocess the image of the goods; Call the trained new goods category discovery model to perform forward propagation processing on the preprocessed goods image to obtain the final classification Logits z, calculate the probability distribution according to the classification Logits z, select the corresponding category index, perform category judgment, and perform new goods category discovery and addition according to the category judgment result; Before calling the trained new goods category discovery model to perform forward propagation processing on the preprocessed goods image, it further includes: Construct a goods data set including labeled and unlabeled goods, and preprocess the goods data set to obtain a mixed data set as the input of the trained new goods category discovery model; For the goods images in the mixed dataset x perform asymmetric data augmentation processing to generate a coarse-grained enhanced view v c and a fine-grained enhanced view v f ; Use a preset shared feature extraction backbone network for the coarse-grained enhanced view v c and the fine-grained enhanced view v f to perform feature extraction processing to obtain projection features p and classification Logits z; Construct an overall optimization objective function, perform multi-task loss calculation processing based on the projection feature p and the classification Logits z to obtain the total loss result, and update the new goods category discovery model according to the total loss result until the output result of the model meets the preset requirements, end the training, and obtain the trained new goods category discovery model; Construct an overall optimization objective function, perform multi-task loss calculation processing based on the projection feature p and the classification Logits z to obtain the total loss result, and update the new goods category discovery model according to the total loss result. Specifically: Construct the overall optimization objective function , perform multi-task loss calculation processing based on the overall optimization objective function, projection feature p, and classification Logits z to obtain the total loss result, where and are both weight coefficients, is the self-distillation clustering loss, is the supervised classification loss based on Logit adjustment, is the unsupervised contrastive loss, is the supervised contrastive loss, is the confidence collaborative feature learning loss; Update the new goods category discovery model according to the total loss result; For the labeled samples and their corresponding views, use the number of samples of known classes to adjust their classification Logits z and calculate the supervised classification loss of Logit adjustment, with the formula: , where is the sample on the class logit value, is the number of samples of class , is the number of samples of class , is the sample on the class logit value, is all other classes except the current class y, is the temperature parameter; Calculate the unsupervised contrastive loss for the projection feature p of all views of all samples , where and are the feature representations of two different views of the same item, is the feature representation of any other sample in the batch, is the number of samples in each batch; Calculate the supervised contrastive loss for the labeled samples and their views , where is the set of positive sample views of the same class as the sample , and is the total number of samples in the training dataset; Knowledge distillation is carried out using the teacher-student framework to obtain the Logits z output by the student network and the target probability q output by the teacher network, and the self-distillation clustering loss between the two is calculated , is the sample obtained from the teacher model belongs to the category of the soft label, , is the predicted probability corresponding to the student model, is the total number of categories predicted by the model, including known and unknown categories, is the logit output value of the student network for sample i on category j, is the temperature parameter in knowledge distillation, used to control the smoothness of the soft label, is the logit output value of the student network for sample i on category k; Calculate the predicted pseudo-labels based on the Logits z of all samples by the current model and the corresponding predicted confidence , design a confidence-based collaborative feature learning mechanism, and construct a sample neighborhood set: , where is the pseudo-label predicted by the model, is the predicted confidence, is the confidence threshold, is the predicted pseudo-label of sample j, is the predicted confidence of sample j, is the logits vector output by the model, is the temperature parameter used to calculate the confidence, which is used to control the smoothness of softmax; Calculate the confidence collaborative feature learning loss based on the sample neighborhood set .

2. The method for discovering new product categories based on asymmetric enhancement and confidence collaborative learning according to claim 1, wherein The preprocessing includes unified size processing and pixel value normalization processing. Among them, the unified size processing includes cropping processing and scaling processing.

3. The method for discovering new product categories based on asymmetric enhancement and confidence collaborative learning according to claim 1, wherein Calculate the probability distribution according to the classification Logits z, select the corresponding category index, perform category judgment, and perform new goods category discovery and addition according to the category judgment result. Specifically: Calculate the probability distribution P according to the classification Logits z, and its formula is: P = softmax(z), where z is the final classification Logits z; Screen out the category index pred_idx with the highest probability corresponding to the probability distribution P, that is, pred_idx = argmax(P), and perform category judgment according to the category index pred_idx with the highest probability; Among them, if the category index pred_idx with the highest probability falls within the preset known category index range, the category judgment result is that the goods are the corresponding known goods. If the category index pred_idx with the highest probability falls within the preset unknown category index range, the category judgment result is that the goods are a newly discovered goods category; For the newly discovered goods category, after user confirmation, temporary ID assignment, and sample accumulation, it is officially added to the goods database as the basis for subsequent goods recognition.

4. The method for discovering new product categories based on asymmetric enhancement and confidence collaborative learning according to claim 1, wherein Construct a goods data set including labeled and unlabeled goods, and preprocess the goods data set. Specifically: Collect the images of the goods already entered in the electronic scale, construct a labeled data set according to the images of the goods already entered and their corresponding category labels, and count the sample quantity distribution of each known category in the labeled data set for subsequent Logit adjustment. Among them, the categories of the images in the labeled data set belong to known categories; Collect images of goods that appear in the actual scenario and are not registered in the system or have unknown labels, and construct an unlabeled dataset. Among them, the categories corresponding to the images in the unlabeled dataset include known categories and unknown new categories; Preprocess the images in the labeled dataset and the unlabeled dataset. The preprocessing includes unified size processing and pixel value normalization processing to obtain a mixed dataset. Among them, the unified size processing includes cropping processing and scaling processing.

5. The method for discovering new product categories based on asymmetric enhancement and confidence collaborative learning according to claim 1, wherein For the product images in the mixed dataset perform asymmetric data augmentation processing to generate a coarse-grained enhanced view and a fine-grained enhanced view , specifically: Perform a gentle data augmentation operation on the item image x in the mixed dataset to generate a coarse-grained augmented view , maximizing the retention of the overall structure and main visual features of the item to keep the main features of the item unchanged Perform drastic data augmentation operations on the product image x in the mixed dataset to generate fine-grained enhanced views to increase sample detail features.

6. The method for discovering new product categories based on asymmetric enhancement and confidence collaborative learning according to claim 5, wherein Mild data augmentation operations include: random horizontal flipping with a probability of 0.5, random rotation at a small angle, the angle is ±15°, small-scale random cropping, retaining 0.85 - 0.95 of the original image area; Severe data augmentation operations include: random horizontal flipping with a probability of 0.5, random rotation at a large angle, the angle is ±30°, large-scale random cropping, retaining 0.6 - 0.9 of the original image area, random color jittering, random grayscaling, and Gaussian blur. Among them, random color jittering includes randomly changing brightness, contrast, saturation, and hue.

7. The method for discovering new product categories based on asymmetric enhancement and confidence collaborative learning according to claim 1, characterized in that Use a preset shared feature extraction backbone network for the coarse-grained enhanced view v c and the fine-grained enhanced view v f to perform feature extraction processing to obtain projection features p and classification Logits z, specifically: Input the coarse-grained enhanced view v c and the fine-grained enhanced view v f into a preset shared feature extraction backbone network to process each enhanced view, and obtain the deep features v c corresponding to the coarse-grained enhanced view and the deep features v f corresponding to the fine-grained enhanced view , where the shared feature extraction backbone network is Vision Transformer; Based on a projection head and a classification head connected to a shared feature extraction backbone network, deep features and deep features are mapped into a preset low-dimensional space to obtain projection features p and classification Logits z. The projection features p include projection features corresponding to the coarse-grained enhanced view v c and projection features corresponding to the fine-grained enhanced view v v f and projection features .

Citation Information

Patent Citations

  • Active learning-based open set image recognition method and system

    CN116681975A

  • AI (Artificial Intelligence) generated face image authenticity judgment method and device and storage medium

    CN119992630A