Fresh Produce Long-Tail Recognition Learning Method Guided by Perceptual Manifold Volume Information
Through the iterative optimization strategy guided by perceived manifold volume information, the long tail distribution problem in fresh product image recognition is solved, and the recognition accuracy and robustness of the model is improved, especially the recognition ability of categories with a small sample number, which is suitable for fresh product recognition in unmanned retail scenarios.
Patent Information
- Application Number
- CN202510704596.1
- 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
In unmanned retail stores, image recognition of fresh goods faces the problem of long tail distribution, and existing long tail recognition learning methods are difficult to effectively balance the recognition performance of different categories, especially when the sample number is extremely unbalanced, which leads to the model's bias towards categories with a large number of samples and insufficient recognition ability.
It adopts an iterative optimization strategy based on perceived manifold volume information guidance, by building a teacher network and a student network, using the teacher network to calculate manifold volumes of different categories, adjust the classification weight of the student network, and conduct blocked knowledge distillation training, combining logit to weigh classification losses and blocked knowledge distillation losses, and periodic iterative fine-tuning is carried out.
It significantly improves the accuracy and robustness of the model's identification of long-tail distribution data, improves the ability to identify categories with a small sample size, and enhances the application value of the model in unmanned retail scenarios.
Smart Images

Figure CN120236147B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of long-tail image recognition, and particularly to a fresh product long-tail recognition learning method guided by perceptual manifold volume information. Background Art
[0002] In the modern retail industry, especially in unmanned retail stores, image recognition technology is widely used in automatic commodity recognition and settlement. However, in practical applications, in an open environment, the image recognition of fresh products faces a severe challenge: the long-tail characteristic of data distribution. The long-tail distribution refers to the phenomenon that in a dataset, a small number of categories have a large number of samples, while the number of samples in most categories is scarce. This imbalance in data distribution is particularly prominent in fresh products because the sales situations of fresh products vary greatly, the image data of best-selling products is abundant, while the image data of slow-selling or newly launched products is extremely limited.
[0003] The long-tail distribution problem has a significant impact on the training of image recognition models. Due to the imbalance in the amount of data, traditional image recognition models tend to be biased towards categories with a larger number of samples during the training process, resulting in insufficient recognition ability for categories with a smaller number of samples. This bias not only reduces the overall recognition accuracy of the model but also limits its application value in actual scenarios. Although various long-tail recognition learning methods have been proposed currently, these methods still have limitations when dealing with fresh product data. For example, existing long-tail learning methods often have difficulty effectively balancing the recognition performance between different categories, especially in the case of extremely unbalanced sample numbers.
[0004] In addition, the particularity of fresh products also increases the recognition difficulty. The appearance characteristics of fresh products may change due to factors such as freshness, lighting conditions, and placement methods, which requires the image recognition model to have stronger robustness and adaptability. However, existing long-tail learning methods often cannot fully consider the diversity and complexity of the data when dealing with these complex situations, resulting in poor performance of the model in actual applications.
[0005] In view of this, the present application is proposed. Summary of the Invention
[0006] The present invention provides a fresh product long-tail recognition learning method guided by perceptual manifold volume information, which can at least partially improve the above problems.
[0007] To achieve the above object, the present invention adopts the following technical solutions:
[0008] A fresh product long-tail recognition learning method guided by perceptual manifold volume information, which includes:
[0009] Train a preset intelligent goods image recognition model based on traditional long-tail recognition methods to obtain a student network and a teacher network, and calculate the perceptual manifold volume of different categories based on the teacher network to obtain the required perceptual manifold volume information;
[0010] Use the perceptual manifold volume information as a weight factor to adjust the logits output of the student network, and calculate the logit reweighted classification loss;
[0011] According to the perceptual manifold volume information, perform block processing on the softmax layers of the student network and the teacher network, and calculate the block knowledge distillation loss based on the logits within each block;
[0012] Combine the logit reweighted classification loss and the block knowledge distillation loss based on the logits to obtain a total loss function, and fine-tune the student network according to the total loss function;
[0013] Repeat the above fine-tuning steps until the fine-tuning of the preset number of cycles is completed. Copy the student network to replace the original teacher network and enter a new round of iterative fine-tuning until the obtained student network meets the preset standard.
[0014] In summary, in the actual scenario, the long-tail distribution of fresh produce data leads to a huge difference in the number of samples, making the traditional model tend to favor the categories with more samples during training and ignore the categories with fewer samples. To solve this problem, the long-tail recognition learning method for fresh produce guided by perceptual manifold volume information is proposed. After the traditional model training is completed, an iterative optimization strategy based on perceptual manifold volume is introduced. By constructing a teacher network and a student network, the manifold volume of different categories is calculated using the teacher network, and the classification weights of the student network are adjusted accordingly. At the same time, the network is processed in blocks based on the manifold volume information, and knowledge distillation training is implemented between the blocks. Through periodic iterative updates, this method can effectively balance the model's recognition ability for different categories of goods, enabling the model to exhibit higher accuracy and robustness under long-tail distributed data, providing a better solution for fresh produce recognition in the unmanned retail scenario.
[0015] Specifically, after training the model with the traditional long-tail recognition learning method, the long-tail recognition learning method for fresh food products guided by the volume information of the perceptual manifold innovatively adds an iterative fine-tuning stage guided by the volume information of the perceptual manifold. In this stage, the method sets the trained model as the student network of the existing long-tail recognition learning method, and copies one as the teacher network. The teacher network is used to calculate the volume of the perceptual manifold for different categories, and based on this, the classification loss of logit calculation and re-weighting is adjusted to fine-tune the student network. At the same time, according to the manifold volume information, the softmax layers of the teacher and student networks are divided into blocks, and block knowledge distillation training is implemented on the student network between the corresponding blocks. By setting the number of iterative steps, the teacher network is periodically updated and the volume is recalculated to continuously iteratively fine-tune the student network, so as to promote the balanced distribution of the volumes of the perceptual manifolds of various categories in the representation space learned by the student network, and achieve the balanced learning and recognition of various fresh food product categories by the student network. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic flowchart of the long-tail recognition learning method for fresh food products guided by the volume information of the perceptual manifold provided by an embodiment of the present invention;
[0017] Figure 2 is an overall process framework diagram of the long-tail recognition learning method for fresh food products guided by the volume information of the perceptual manifold provided by an embodiment of the present invention;
[0018] Figure 3 is a schematic diagram of the preheating stage provided by an embodiment of the present invention;
[0019] Figure 4 is a schematic diagram of the iterative fine-tuning stage provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, 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.
[0021] In real - world retail fresh produce datasets, the severe long - tail distribution phenomenon is quite common. Some produce categories have a large number of samples, while those with poor sales have significantly insufficient sample quantities. This situation leads to a severely imbalanced training set when training an intelligent produce image recognition system. Although there are currently various long - tail recognition learning methods, this problem still has not been effectively solved. To effectively overcome the long - tail problem in the field of retail fresh produce, the present invention proposes adding an iterative fine - tuning stage guided by the perceived manifold volume information after completing model training using traditional long - tail recognition learning methods. It has been found through research that the models trained by current long - tail recognition learning methods have a significant bias in the representation space for all categories towards the head categories (i.e., produce categories with a large number of samples). In terms of manifold performance, the representations of head categories occupy a larger representation area, meaning that their perceived manifold volume is much larger than that of tail categories (i.e., produce categories with few samples).
[0022] Based on this, referring to Figure 1 、 Figure 2 as shown, the first embodiment of the present invention discloses a fresh produce long - tail recognition learning method guided by perceived manifold volume information, which can be executed by a fresh produce long - tail recognition learning device guided by perceived manifold volume information (hereinafter referred to as the learning device), and specifically, executed by one or more processors in the learning device to implement the following method:
[0023] Please refer to Figure 3 、 Figure 4 , S1, Train a preset intelligent produce image recognition model based on traditional long - tail recognition methods to obtain a student network and a teacher network, and calculate the perceived manifold volume of different categories based on the teacher network to obtain the required perceived manifold volume information;
[0024] Specifically, step S1 includes: Training a preset intelligent produce image recognition model on a preset long - tail fresh produce dataset using traditional long - tail recognition methods, and defining the trained intelligent produce image recognition model as the student network;
[0025] Copy the student network, and define the copy of the student network as the teacher network.
[0026] In this embodiment, first, a preset long-tail fresh food product dataset is selected. This dataset contains images of various fresh food products, and the class distribution of these images exhibits typical long-tail characteristics, that is, a small number of classes have a large number of samples, while the majority of classes have a small number of samples. Then, a traditional long-tail recognition method is used to train a preset intelligent product image recognition model, which is usually a deep learning model. The traditional long-tail recognition method used here can be any known deep learning method that can handle class imbalance problems, such as resampling techniques, class weight adjustment, etc. By training on the long-tail fresh food product dataset, the model can learn the features of different fresh food product images and initially form the recognition ability for various classes of products. When the training is completed, the obtained intelligent product image recognition model is defined as the student network. The student network already has a certain recognition ability at this time, but its performance may be affected by the long-tail distribution, and its recognition ability for the tail classes with a small number of samples is relatively weak.
[0027] Next, in order to be able to optimize the student network using the perceptual manifold volume information in the follow-up, it is necessary to copy the already trained student network to obtain a copy, and this copy is defined as the teacher network. The teacher network and the student network have the same structure and parameters in the initial stage, but they will play different roles in the subsequent iterative fine-tuning stage. The main role of the teacher network is to act as a guide and use the perceptual manifold volume information calculated by it to guide the optimization process of the student network, while the student network is continuously fine-tuned under the guidance of the teacher network to improve its recognition performance for long-tail distribution data.
[0028] Among them, Figure 4 the snowflake in indicates that the model is in a frozen state and the parameters are fixed and not updated; Figure 4 the fire in indicates that the model is in an update state and the parameters need to be optimized.
[0029] Preferably, based on the teacher network, calculate the perceptual manifold volume of different classes to obtain the final required perceptual manifold volume information, specifically:
[0030] According to the teacher network, calculate the perceptual manifold volume of different classes, and its calculation formula is: , where, is the perceptual manifold volume of class , is the representation matrix of class , is the average value of all representations of class , is the number of all product classes, is the determinant function, indicating calculating the determinant value of the matrix;
[0031] Among them, when the number of samples of class is 1, the volume of the perceptual manifold of class is ;
[0032] Normalize the volume of the perceptual manifold corresponding to each class to obtain the required volume information of the perceptual manifold. The formula is: , where is the sum of the volumes of all classes.
[0033] In this embodiment, after obtaining the teacher network, the next key step is to calculate the volume of the perceptual manifold of different classes based on the teacher network. The volume of the perceptual manifold is an important concept that reflects the distribution of different classes in the feature space. Specifically, for each class, the teacher network calculates the volume of its perceptual manifold. The calculation of the volume of the perceptual manifold can be achieved by analyzing the features extracted by the teacher network. For example, the determinant value of the covariance matrix of all sample features within the class can be calculated to measure the volume occupied by the class in the feature space. In this way, the volume information of the perceptual manifold of each class can be obtained, and these information will provide key guiding basis for the subsequent iterative fine-tuning stage. This formula measures the distribution range of the class in the feature space by calculating the square root of the determinant value of the covariance matrix of the sample features within the class, so as to obtain the volume of the perceptual manifold.
[0034] In particular, when the number of samples of a certain class is only 1, in order to ensure the stability of the calculation and avoid numerical problems, it is stipulated that the volume of the perceptual manifold of this class is a preset small positive value. For example: when the number of samples of class is 1, the volume of the perceptual manifold of class is , and by adding a tiny value , it can be ensured that they are all greater than zero. This processing method not only avoids calculation errors caused by too few samples, but also provides reasonable initial values for the subsequent optimization process.
[0035] After calculating the volume of the perceptual manifold of each class, in order to make these volume information comparable fairly among different classes and be used as weight factors in the subsequent optimization process, normalize the volume of the perceptual manifold of each class. Through normalization, the volume of the perceptual manifold of each class is converted into a relative value, and the sum of these relative values is 1, thus ensuring that in the subsequent optimization process, the volume information of different classes can participate in the adjustment of the model in a balanced manner.
[0036] S2. Use the perceptual manifold volume information as a weight factor to adjust the logits output of the student network, and calculate the logit reweighted classification loss;
[0037] Specifically, step S2 includes: The formula for the logit reweighted classification loss is: , where , is the student network, is the product image, is the corresponding class label, is a hyperparameter, is the set of all product classes, is the weight factor calculated using the normalized manifold volume, is the student network model of the logits output at the class label at this position, is the student network model of the logits output at the class label at this position.
[0038] In this embodiment, the calculated perceptual manifold volume information is used as a weight factor to adjust the logits output of the student network. Here, the logits refer to the raw output of the student network before the softmax layer, and these output values reflect the model's raw prediction confidence for each class. By introducing the perceptual manifold volume information as a weight factor, these logits can be adjusted, enabling the model to pay more attention to the tail classes with fewer samples when calculating the classification loss, thereby reducing the model's over - bias towards the head classes. The introduction of the weight factor is an important innovation of the present invention. It measures the "importance" of each class through the perceptual manifold volume information and adjusts the classification loss function accordingly. Specifically, for the tail classes with a smaller perceptual manifold volume, their weight factors will be relatively larger, thus receiving more attention when calculating the classification loss; while for the head classes with a larger perceptual manifold volume, their weight factors are relatively smaller, thus appropriately reducing their weight in the classification loss. This weight adjustment mechanism based on the perceptual manifold volume can effectively balance the model's recognition ability for different classes of products, especially improving the recognition performance for tail classes.
[0039] Through this calculation method of logit re-weighted classification loss, the student network can learn the features of various types of goods more evenly during the training process, rather than simply being biased towards the head categories with a large number of samples. This improvement not only helps to improve the overall recognition accuracy of the model for long-tailed distribution data, but also enhances the robustness and generalization ability of the model in practical applications. For example, in the unmanned retail scenario, even if the sample quantity of some fresh goods is small, the model can accurately identify these goods, thereby improving the accuracy and reliability of the automatic settlement system. In addition, through the logit re-weighted classification loss guided by the perceived manifold volume information, it can also be combined with other traditional long-tailed learning methods to further improve the performance of the model.
[0040] S3. According to the perceived manifold volume information, perform block processing on the softmax layers of the student network and the teacher network, and calculate the block knowledge distillation loss based on logits within each block;
[0041] Specifically, step S3 includes: dividing the perceived manifold volume information of different categories into blocks so that the manifold volume of each category within each block is relatively consistent, and marked as , where is a preset constant, represents the th block, is the first block, is the second block, is the th block, represents the set of categories belonging to the th block, is the set of categories belonging to the th block, is the set of categories belonging to the th block, is the set of categories belonging to the th block;
[0042] According to this block result, perform corresponding segmentation processing on the softmax layers of the student network and the teacher network, and calculate the corresponding block knowledge distillation loss based on logits on each block. The formula is: , where is the teacher network, is the temperature parameter, is to calculate softmax for logits only on the categories included in , is the value at the category y position, is the number of categories included in
[0043] It further includes: based on a preset addition rule, judging whether to combine the loss function of traditional long-tail learning according to the current recognition situation to obtain a total loss function, where the loss function of traditional long-tail learning is a regularization term.
[0044] In this embodiment, different categories are segmented into several blocks according to the perceptual manifold volume information, so that the perceptual manifold volumes of each category within each block are relatively consistent. The purpose of this segmentation strategy is to ensure that the categories within each block have a similar feature space distribution during the knowledge distillation process, thereby improving the effect of knowledge distillation. For example, assume that the categories are divided into K blocks according to the perceptual manifold volume. The category sets within each block are respectively . This segmentation method not only helps to simplify the calculation, but also ensures that the categories within each block have similar distribution characteristics in the feature space, thus providing more favorable conditions for subsequent knowledge distillation.
[0045] Immediately afterwards, corresponding segmentation processing is performed on the softmax layers of the student network and the teacher network according to the above segmentation results to ensure that the manifold volumes of the categories within each block are relatively consistent, or the volume sizes have small differences. Specifically, for each block, the softmax function is calculated only on the categories included in that block. The purpose of this operation is to perform knowledge distillation independently within each block and avoid interference between the categories of different blocks. Within each block, the block knowledge distillation loss based on logit is calculated. By independently calculating the knowledge distillation loss within each block, the student network can more accurately learn the knowledge of the teacher network within that block, thereby improving the recognition ability of each category, especially the recognition performance of the tail categories.
[0046] In addition, the present invention also provides a flexible mechanism that can judge whether to combine the traditional long-tail learning loss function according to the current recognition situation. Specifically, based on a preset addition rule, for example, when the optimization effect of the block knowledge distillation loss is not obvious, the traditional long-tail learning loss function can be selectively added as a regularization term to the total loss function. This combination method not only fully utilizes the advantages of the perceptual manifold volume information, but also retains the effectiveness of the traditional long-tail learning method, thereby further improving the performance of the model. Simply put, at this stage, the loss function used in traditional long-tail learning is used as an optional item depending on the actual effect.
[0047] S4. Combine the logit and then weigh the classification loss and the block knowledge distillation loss based on logit to obtain a total loss function, and fine-tune the student network according to the total loss function;
[0048] Specifically, step S4 includes: The formula of the total loss function is: , where , and are all hyperparameters, is an optional item, and the loss function of unified long-tail learning is adopted.
[0049] In this embodiment, the total loss function is constructed by reweighting the classification loss and the chunk-based knowledge distillation loss based on logits. In addition, the traditional long-tail learning loss function, as an optional item, can be selected to be added to the total loss function as needed. Through this comprehensive optimization method, the student network can be constrained by both the reweighted classification loss based on logits and the chunk-based knowledge distillation loss during the training process. The reweighted classification loss based on logits adjusts the classification weights by perceiving the manifold volume information, making the model pay more attention to the tail classes with fewer samples; while the chunk-based knowledge distillation loss transfers knowledge to the student network under the guidance of the teacher network to further optimize the classification performance of the student network. This dual-constraint mechanism can not only effectively balance the model's recognition ability for different categories of goods, but also improve the robustness and generalization ability of the model under complex long-tail distribution data.
[0050] Specifically, the student network is fine-tuned according to the total loss function. The fine-tuning process is an iterative optimization process, and the parameters of the student network are updated through the backpropagation algorithm to gradually reduce the value of the total loss function. In each iteration, the parameters of the student network are adjusted according to the gradient of the total loss function, thereby gradually optimizing the performance of the model. By setting appropriate iteration times and learning rates, the student network can gradually learn a more balanced category recognition ability during the fine-tuning process, especially in the case of extremely unbalanced sample numbers, and can significantly improve the recognition accuracy of the tail classes. It should be noted that the teacher network is fixed and not updated.
[0051] In addition, by introducing the traditional long-tail learning loss function as a regularization term, the student network can further benefit from the advantages of traditional methods during the fine-tuning process. This combination method not only makes full use of the innovation of the manifold volume information perception and knowledge distillation technology, but also retains the effectiveness of traditional long-tail learning methods, enabling the model to more flexibly adjust the optimization strategy when facing complex long-tail distribution data.
[0052] The core purpose of the iterative fine-tuning guided by the manifold volume information perception is to promote a more balanced distribution of the manifold volumes of each category in the feature space, and finally achieve the ideal effect of balanced learning.
[0053] S5. Repeat the above fine-tuning steps until the fine-tuning for a preset number of cycles is completed. Copy the student network to replace the original teacher network, and enter a new round of iterative fine-tuning until the obtained student network meets the preset standard.
[0054] Specifically, step S5 includes: continuing to fine-tune the student network according to the total loss function. When the fine-tuning for K cycles is completed, copy the student network to replace the original teacher network to obtain a new teacher network, where K is the preset number of iterative steps.
[0055] Recalculate the perceptual manifold volumes of different categories according to the new teacher network, and perform a new round of iterative fine-tuning.
[0056] Enter a new round of iterative fine-tuning until the obtained student network meets the preset standard.
[0057] In this embodiment, after the fine-tuning of the student network based on the total loss function is completed, continue to fine-tune according to the preset number of iterative steps K. In each fine-tuning cycle, the student network updates its parameters according to the total loss function, gradually optimizing its recognition ability for different categories of goods. When the fine-tuning for K cycles is completed, copy the current student network and use the copied network to replace the original teacher network, thereby obtaining a new teacher network. The purpose of this replacement operation is to introduce the latest model parameters and knowledge, so that the subsequent iterative fine-tuning can be guided based on a more optimized teacher network.
[0058] After obtaining the new teacher network, recalculate the perceptual manifold volumes of different categories according to the new teacher network. This recalculation process is necessary because as the student network is continuously optimized, its data representation ability will also change, thus affecting the distribution of the perceptual manifold volumes. By recalculating the perceptual manifold volumes, it can be ensured that the subsequent fine-tuning process can be optimized based on the latest and more accurate volume information, further improving the performance of the student network.
[0059] Subsequently, enter a new round of iterative fine-tuning. In the new iterative process, the student network continues to be fine-tuned according to the total loss function, and at the same time adjusts the classification loss and knowledge distillation loss using the perceptual manifold volume information calculated by the new teacher network. This process will be repeated continuously. After each completion of the fine-tuning for K cycles, the student network will be copied to replace the teacher network, and the perceptual manifold volumes will be recalculated to start the next round of iterative fine-tuning. Through this periodic iterative update mechanism, the student network can gradually learn a more balanced category recognition ability. Especially when dealing with long-tail distribution data with extremely unbalanced sample numbers, it can significantly improve the recognition performance for tail categories.
[0060] The beneficial effect of this process is that through periodic iterative fine-tuning and the update of the teacher network, the student network can continuously absorb the latest knowledge and information, thereby gradually optimizing its recognition ability for long-tailed distribution data. Each iterative fine-tuning is based on the latest teacher network and the perceptual manifold volume information, which enables the student network to adjust its parameters more precisely to adapt to the complexity of long-tailed distribution data. In addition, by setting preset criteria, such as the recognition accuracy of the model reaching a certain threshold or the value of the loss function no longer decreasing significantly, it can be ensured that the student network stops iterating after reaching the optimal performance, avoiding the overfitting problem caused by overtraining.
[0061] Finally, through the periodic iterative fine-tuning of this step, the student network can gradually reach the preset performance standard and become a model with high recognition accuracy and strong robustness under long-tailed distribution data. This process not only solves the limitations of traditional long-tail learning methods in processing fresh produce data but also provides a more efficient and accurate solution for the recognition of fresh produce in the unmanned retail scenario. Through this continuously optimized strategy, the student network can better adapt to the long-tailed distribution problem in practical applications, thereby significantly improving the intelligence level and user experience of the unmanned retail system.
[0062] In this embodiment, the long-tail recognition learning method for fresh produce guided by perceptual manifold volume information is guided by the perceptual manifold volume information, which can effectively enhance the robustness of the goods intelligent recognition system in the open environment when facing long-tailed distribution, and further improve the intelligence level of the fresh produce automatic settlement system.
[0063] In summary, the long-tail recognition learning method for fresh produce guided by perceptual manifold volume information introduces the perceptual manifold volume information as the key guiding for optimization on the basis of traditional long-tail recognition learning methods. By calculating the perceptual manifold volumes of different classes and using them as weight factors to adjust the classification loss function, the model can pay more attention to the tail classes with fewer samples. This innovation not only balances the model's recognition ability for different classes of goods but also significantly improves the recognition accuracy of the tail classes, solving the problem that the model in traditional methods tends to the head classes.
[0064] Secondly, through the collaborative optimization of the teacher network and the student network, the performance of the model is further improved. The teacher network provides the optimization direction and goal for the student network by calculating the perceptual manifold volume information. The student network is then fine-tuned under the guidance of the teacher network by re-weighting the classification loss and the block knowledge distillation loss through logits. This optimization strategy based on knowledge distillation enables the student network to inherit the excellent features of the teacher network while avoiding the overfitting problem, further improving the generalization ability of the model.
[0065] In addition, a periodic iterative fine-tuning mechanism is introduced. In each iteration cycle, the student network is optimized according to the total loss function. After completing the fine-tuning for the preset number of steps, the student network is copied to replace the teacher network, the perceptual manifold volume is recalculated, and a new round of iterative fine-tuning is started. This mechanism not only ensures that the model can be optimized based on the latest information at each stage, but also introduces new knowledge and features by continuously updating the teacher network, enabling the student network to gradually improve its ability to recognize long-tail distribution data.
[0066] Generally speaking, the long-tail recognition learning method for fresh food products guided by perceptual manifold volume information not only effectively solves the long-tail distribution problem, but also significantly improves the accuracy and robustness of fresh food product image recognition. In the unmanned retail scenario, this method can significantly improve the efficiency and accuracy of the automatic settlement system, reducing customer dissatisfaction and increased operating costs caused by recognition errors. In addition, the method also has good scalability and adaptability, and can be flexibly adjusted according to different data sets and application scenarios, providing strong technical support for the development of the unmanned retail industry.
[0067] The above are the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.
Claims
1. A long-tail recognition learning method for fresh goods guided by the volume information of the perceptual manifold, characterized in that Including: Training a preset intelligent goods image recognition model based on a traditional long-tail recognition method to obtain a student network and a teacher network, and calculating the perceptual manifold volume of different categories based on the teacher network to obtain the required perceptual manifold volume information; Taking the perceptual manifold volume information as a weight factor, adjusting the logits output of the student network based on this weight factor, and calculating the logit reweighted classification loss; Performing block processing on the softmax layers of the student network and the teacher network according to the perceptual manifold volume information, and calculating the block knowledge distillation loss based on logits within each block; Combining the logit reweighted classification loss and the block knowledge distillation loss based on logits to obtain a total loss function, and fine-tuning the student network according to the total loss function; Repeating the above fine-tuning steps until the fine-tuning of a preset number of cycles is completed, copying the student network to replace the original teacher network, and entering a new round of iterative fine-tuning until the obtained student network meets the preset standard; Calculating the perceptual manifold volume of different categories based on the teacher network to obtain the required perceptual manifold volume information, specifically: Calculate the perceived popularity volume of different categories according to the teacher network, and its calculation formula is: , where is the perceived manifold volume of category , is the representation matrix of category , is the average value of all representations of category , is the number of all product categories, is the determinant function, indicating to calculate the determinant value of the matrix; Among them, when the number of samples of class is 1, the perceptual manifold volume of class is ; Normalize the perceived popularity volume corresponding to each category to obtain the required perceived manifold volume information, and its formula is: , where is the total volume of all categories; The formula for the logit re-weighted classification loss is as follows: , where , is the student network, is the product image, is the corresponding class label, is a hyperparameter, is the set of all product classes, is the weight factor calculated using the normalized popularity volume, is the student network model the value of the logit output of at this position of the class label is the student network model the value of the logit output of at this position of the class label; Performing block processing on the softmax layers of the student network and the teacher network according to the perceptual manifold volume information, and calculating the block knowledge distillation loss based on logits within each block, specifically: Segment the volume information of different categories of perceptual manifolds into blocks such that the manifold volumes of each category within each block are relatively consistent, and label them as , where is a preset constant, represents the th block, is the first block, is the second block, is the th block, represents the set of categories belonging to the th block, is the set of categories belonging to the th block, is the set of categories belonging to the th block, is the set of categories belonging to the th block; According to this chunking result, the softmax layers of the student network and the teacher network are segmented accordingly, and the corresponding chunk-based knowledge distillation loss based on logits is calculated on each chunk. The formula is as follows: , where is the teacher network, is the temperature parameter, calculates the softmax of the logits only on the classes included in , is the value at the position of class y, is the number of classes included in 2. The method for identifying and learning the long tail of fresh goods guided by the volume information of the perceptual manifold according to claim 1, wherein Training a preset intelligent goods image recognition model based on a traditional long-tail recognition method to obtain a student network and a teacher network, specifically: Training a preset intelligent goods image recognition model using a traditional long-tail recognition method on a preset long-tail fresh food dataset, and defining the trained intelligent goods image recognition model as the student network; Copying the student network, and defining the copy of the student network as the teacher network.
3. The method for identifying and learning the long tail of fresh goods guided by the volume information of the perceptual manifold according to claim 1, wherein Also including: Based on a preset addition rule, judging whether to combine the loss function of traditional long-tail learning according to the current recognition situation to obtain a total loss function, where the loss function of traditional long-tail learning is a regularization term.
4. The method for identifying and learning the long tail of fresh goods guided by the volume information of the perceptual manifold according to claim 3, wherein The formula of the total loss function is as follows: , where , and are all hyperparameters, is an optional item, and the loss function of traditional long-tailed learning is adopted.
5. The method for identifying and learning the long tail of fresh goods guided by the perceptual manifold volume information according to claim 1, wherein Repeating the above fine-tuning steps until the fine-tuning of a preset number of cycles is completed, copying the student network to replace the original teacher network, and entering a new round of iterative fine-tuning until the obtained student network meets the preset standard, specifically: Continuing to fine-tune the student network according to the total loss function, and when the fine-tuning of K cycles is completed, copying the student network to replace the original teacher network to obtain a new teacher network, where K is the preset number of iterative steps; Recalculating the perceptual manifold volume of different categories according to the new teacher network and performing a new round of iterative fine-tuning; Entering a new round of iterative fine-tuning until the obtained student network meets the preset standard.
Citation Information
Patent Citations
Small sample image classification method based on manifold learning and high-order graph neural network
CN113052263A
Long-tail commodity recommendation method based on accurate symmetric positive definite manifold learning
CN119809766A