A method for AI model to identify shoe parameters

Through the deep learning model YOLOv5s and the improved residual network, combined with the mutual channel loss function and optimization strategy, the problems of low accuracy and poor flexibility of shoe parameter recognition in the existing technology are solved, and efficient and accurate multi-dimensional feature recognition and Quick adaptability.

CN118736335BActive Publication Date: 2024-12-03浙江惠利玛产业互联网有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411224753.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-03
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

The prior art has problems in the recognition of footwear parameters that low recognition accuracy and poor flexibility, and cannot adapt to the characteristics of diversified footwear products and market changes.

Method used

The deep learning model YOLOv5s is used for subject detection, combined with the improved residual network and mutual channel loss function, and the feature extraction accuracy and model adaptability are improved through the stochastic gradient descent optimizer and cosine annealing learning rate scheduling strategy.

Benefits of technology

It improves the accuracy and efficiency of footwear product identification, enhances the adaptability and scalability of the system, and can quickly adapt to new labels and market changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736335B_ABST
    Figure CN118736335B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer vision and deep learning technology, and in particular to a method for AI model recognition of shoe parameters. The YOLOv5s model is used to perform main body detection of footwear products, remove background interference, and improve recognition accuracy. The improved residual network model and mutual channel loss function are combined to enhance the learning and recognition capabilities of multi-dimensional features of footwear products. The model adopts a stochastic gradient descent optimizer and a cosine annealing learning rate strategy to optimize the training process and achieve rapid convergence. The incremental training mechanism enables the model to dynamically adapt to new labels. Cross-platform deployment is achieved through an open neural network exchange format, and model calling is simplified in combination with an application program interface. The present invention significantly improves the efficiency and accuracy of the recognition system and is suitable for a variety of footwear recognition scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision and deep learning technology, and in particular to a method for identifying shoe parameters using an AI model. Background Art

[0002] With the development of artificial intelligence and image processing technology, identifying shoe parameters has become increasingly important in shoe product management, e-commerce, inventory management, and personalized recommendations. However, existing technologies have significant deficiencies in shoe parameter recognition. Traditional methods mainly rely on simple image classification techniques, such as recognition based on specific colors or shapes, which usually use fixed rule sets and feature extraction methods. This approach shows limitations in dealing with diverse shoe product features, especially in identifying complex shoe attributes such as style, material, and design details. This is because existing technologies often rely on a single or limited feature dimension, resulting in low recognition accuracy, poor flexibility, and inability to adapt to changing market demands and new product features. Summary of the invention

[0003] In view of the many problems existing in the above-mentioned prior art, the present invention provides a method for identifying shoe parameters using an AI model. The present invention uses a deep learning model to extract multi-dimensional features of footwear products through a convolutional neural network, and combines the mutual channel loss function to enhance the discriminability and diversity of features. The system uses the YOLOv5s model for subject detection, eliminates background interference, and improves the accuracy of feature extraction. Parameter optimization is performed through the stochastic gradient descent optimizer and the cosine annealing learning rate scheduling strategy, and the model converges rapidly during training. The incremental training and update mechanism enables the model to dynamically adapt to new labels. The entire process improves the accuracy and efficiency of footwear product identification and enhances the adaptability and scalability of the system.

[0004] A method for identifying shoe parameters using an AI model, comprising the following steps:

[0005] Obtain the original image of the footwear product, use the deep learning model YOLOv5s to process the image, detect the main body position of the footwear product, and crop the main part of the footwear product to remove the background interference of the image;

[0006] The cropped footwear images and the characteristic labels of the footwear products are standardizedly labeled, wherein the characteristic labels include the category, color, year, season, style, material, heel height, head shape, and last type of the footwear products, and stored in JSON format to form a data set for training;

[0007] Introducing the mutual channel loss function into the improved residual network model, and using the data set to train the model to improve the model's ability to recognize multi-dimensional features of footwear products;

[0008] The trained residual network model is used to extract features from the input footwear product image, identify and output multi-label information related to the footwear product;

[0009] Convert the trained residual network model into the open neural network exchange format and model weight format to enable rapid deployment of the model in a production environment and support rapid incremental training and updates of newly added labels.

[0010] Preferably, the YOLOv5s model is used to detect the main body position of the footwear commodity, and extract the features of the footwear commodity through a convolutional neural network.

[0011] The YOLOv5s model is a single-stage target detector that has the advantages of real-time and high accuracy, making it very suitable for use when processing large-scale image datasets. Its core working principle is to divide the input image into multiple grid cells and predict the bounding box and category probability in each cell.

[0012] Specifically, the YOLOv5s model first downsamples the input footwear image to reduce computational complexity, and extracts feature information of the image through the backbone network. The backbone network is responsible for extracting low-level features, which contain basic information such as the color and shape of the footwear. Subsequently, the features are further processed by the neck network to enhance the model's robustness to features of different scales. The neck network improves the generalization ability of the model by aggregating information from different scales, enabling it to better detect the location of footwear in the image.

[0013] The head network of YOLOv5s is responsible for the final object detection output. By predicting multiple bounding boxes in each grid cell and performing non-maximum suppression on each bounding box, the model can accurately locate the position of the footwear and eliminate redundant detections. The output of the model includes the category label and location coordinates of each detected object. This information is then used to crop out the main part of the footwear to remove background interference.

[0014] In the present invention, through the detection of the YOLOv5s model, the background part of the footwear product image that is not related to the product is removed, leaving only the main part of the product. Such preprocessing greatly improves the accuracy and efficiency of subsequent recognition tasks. By reducing the complexity and interference of the background, the improved residual network model can focus more on analyzing the actual characteristics of the footwear product, thereby improving the accuracy of multi-dimensional feature recognition. Especially when processing a large number of different types of footwear products, the fast detection capability of the YOLOv5s model ensures the real-time performance of the system and the improvement of user experience.

[0015] Preferably, the standardized labeling process of the characteristic label of the footwear product includes:

[0016] Use image recognition technology to extract features of footwear items;

[0017] The extracted features are converted into standardized labels using the preset labeling standards and stored in JSON format.

[0018] In the present invention, the standardized labeling process of the characteristic labels of footwear products is a key step to improve the recognition accuracy and efficiency. First, the image recognition technology is used to extract features from the image of the footwear products. This technology uses a deep learning model to analyze the input image and extract the multi-dimensional features of the footwear products, such as category, color, style, material, heel height, head shape and last type. These features are not only visually intuitive, but also a high-level summary of the product structure and design details.

[0019] After extracting the features, the system transforms them according to the preset labeling standards and maps the extracted feature data to a standardized label set. The labeling standard is a set of predefined specifications that ensure the consistency and comparability of the feature labels of all footwear products. This standardized process ensures that the features of different footwear products can be compared and analyzed on the same dimension, thereby improving the accuracy and consistency of model recognition.

[0020] The standardization of feature labels not only involves the consistency of labels, but also involves the selection of data storage formats. In the present invention, the standardized feature labels are stored in JSON format. JSON is a lightweight data exchange format with the advantages of good readability, easy parsing and modification. By using the JSON format, the system can easily store, retrieve and transmit label data while keeping the data structured and standardized. This choice not only improves the efficiency of data processing, but also provides a good data foundation for model training and deployment.

[0021] Through this standardized labeling process, the present invention can establish a more consistent and reliable model input on the training data set. Standardized feature labels ensure that footwear product data from different sources and types can be processed and analyzed under a unified framework. This greatly improves the generalization ability of the model, allowing the recognition model to maintain high accuracy and stability in various complex scenarios.

[0022] Preferably, the mutual channel loss function is introduced into the improved residual network model and is calculated by the following formula:

[0023]

[0024] in, represents the mutual channel loss function; represents the discriminative loss; indicates a loss of diversity; is the loss balance factor.

[0025] In the present invention, the improved residual network model improves the recognition ability of multi-dimensional features of footwear products by introducing the mutual-channel loss function (MC-Loss). This loss function combines the discriminative loss and the diversity loss to better guide the model to focus on meaningful feature representations during the learning process and avoid feature redundancy.

[0026] Discriminative loss : This loss enhances the model's attention to key features through the channel attention mechanism, so that the same type of footwear products show consistency in the feature space. This consistency helps the model recognize the same features in different samples, thereby improving classification accuracy. The discriminative loss forces the model to focus on the feature channels that are critical to the recognition task during the learning process, avoiding interference from irrelevant or minor features.

[0027] Diversity loss : This loss avoids the appearance of redundant features by increasing the diversity of feature channels. By imposing diversity constraints on different channels, the model is encouraged to explore more possibilities in feature learning. This diversity helps improve the generalization ability of the model when dealing with complex footwear products, allowing the model to capture more detailed features during the recognition process.

[0028] Loss Balance Factor : As a key parameter to adjust the balance between discrimination and diversity, The choice of directly affects the learning effect of the model. The value can find the best balance between the model focusing on key features and maintaining feature diversity.

[0029] By introducing the mutual channel loss function in the improved residual network, the present invention has achieved significant improvement in the process of multi-dimensional feature recognition of footwear products. First, the discriminative loss ensures that the model is highly sensitive to key features, which greatly improves the recognition accuracy. Secondly, the diversity loss enhances the adaptability and generalization ability of the model, especially when faced with footwear products of different styles and brands, the model can effectively distinguish subtle feature differences. Finally, by reasonably adjusting the loss balance factor, the model achieves a good balance between recognition accuracy and feature diversity, thereby achieving efficient and accurate footwear parameter recognition.

[0030] Preferably, the discriminative loss Calculate by following the steps below:

[0031] Apply channel attention mechanism to each feature channel;

[0032] The cross entropy loss function is used to calculate the discriminative loss for each feature channel.

[0033] In this invention, the discriminative loss is an important component to improve the accuracy of footwear recognition. It is calculated by applying the channel attention mechanism and using the cross entropy loss function. Specifically, the calculation of the discriminative loss is divided into two key steps:

[0034] Apply channel attention mechanism to each feature channel. Channel attention mechanism is an effective method for enhancing the model's attention to specific features in the input data. By introducing the channel attention mechanism, the model can dynamically adjust the weights of different feature channels, so that more important feature channels receive higher weights during model training, while unimportant or interfering feature channels have lower weights. This adaptive feature adjustment method can help the model more accurately extract key features related to footwear product recognition and improve the overall recognition effect.

[0035] The cross entropy loss function is used to calculate the discriminative loss of each feature channel. The cross entropy loss function is a commonly used loss function for classification tasks, which optimizes model parameters by measuring the difference between the model prediction output and the true label. In the present invention, the cross entropy loss function is used to calculate the discriminative loss of each feature channel. This method ensures that the model can effectively distinguish different categories of footwear products on each feature channel, improving the accuracy and precision of recognition.

[0036] The channel attention mechanism enables the model to focus on more discriminative features by applying attention to feature channels. The application of this mechanism is similar to the human visual process, which ignores background noise and focuses on the target object by concentrating attention. Similarly, in the AI ​​model, the channel attention mechanism can enhance the focus on the characteristics of footwear products, allowing the model to effectively identify and distinguish subtle feature differences when processing complex footwear images.

[0037] The cross entropy loss function is used as a measurement tool for discriminative loss. It quantifies the performance of the model in the classification task by calculating the cross entropy between the probability distribution predicted by the model and the true distribution. The smaller the cross entropy loss, the closer the model's prediction results are to the true results, and the stronger the discriminative ability is.

[0038] Through the combination of the above two steps, the discriminative loss achieves significant results in the present invention. First, the application of the channel attention mechanism enables the model to more accurately capture the key features of footwear products during the training process, thereby improving the recognition accuracy. Second, the use of the cross entropy loss function provides an effective measurement tool that enables the model to continuously optimize its discriminative performance.

[0039] The calculation process of the discriminative loss in the present invention not only improves the accuracy and robustness of the shoe commodity recognition model, but also provides reliable technical support for processing diverse and complex shoe data. This process ensures that the model can efficiently identify and classify shoe commodities in various application scenarios, providing users with accurate parameter recognition services.

[0040] Preferably, the diversity loss Calculate by following the steps below:

[0041] Perform maximum pooling on the feature channels in each category;

[0042] Regularize the pooling results.

[0043] In this invention, the introduction of diversity loss is to enhance the feature expression ability of the model, so that it can capture more feature details and changes when identifying footwear products. Diversity loss is calculated through the following steps to ensure that the model maintains the diversity and richness of features during the learning process:

[0044] Perform max pooling on the feature channels in each category. Max pooling is a dimensionality reduction technique used to extract significant features from feature maps. In this step, the model applies the max pooling operation to all feature channels of each category to extract the most significant response value in each category. The purpose of max pooling is to compress feature information while retaining the most meaningful part of the feature map. This operation can effectively reduce the amount of computation and highlight those features that are critical to the classification task.

[0045] Regularization is performed on the pooling results. Regularization is a common technique to prevent model overfitting. By imposing constraints, it ensures that the model can perform well on training data and unseen data. In the present invention, the regularization of the pooling results is mainly to maintain the diversity between different feature channels. This step prevents certain channels from over-dominantly controlling the decision-making process of the model by constraining the activation values ​​of the feature channels. Through regularization, the model is guided to learn and utilize more diverse features, thereby improving its ability to recognize different categories of footwear.

[0046] Max pooling: By selecting the maximum activation value on the feature channel, the model is better able to capture the most significant features. This process is similar to the most prominent details that humans notice first when observing an object. Max pooling reduces data redundancy while retaining feature details, allowing the model to process and analyze image information more efficiently.

[0047] Regularization: In deep learning, regularization improves the generalization ability of the model by constraining its complexity. In diversity loss, regularization ensures that when the model learns features, it not only focuses on significant features, but also considers other possible important information, thereby preventing the model from relying on a single feature for decision making.

[0048] By applying diversity loss, the present invention achieves the following effects in footwear identification: First, the use of maximum pooling significantly improves the efficiency of feature extraction, allowing the model to quickly identify key features with less computing resources. Second, regularization further ensures the robustness and generalization ability of the model, enabling it to accurately identify and classify footwear of different styles, materials, and design details. This combination strategy not only enhances the recognition performance of the model, but also improves its adaptability in diverse application scenarios.

[0049] Preferably, in the feature extraction process, classification is achieved by comparing the multi-dimensional features of the footwear product with known feature templates, and a confidence score is given to each recognition result.

[0050] In the present invention, the feature extraction process is the key link in identifying the parameters of footwear products. The core of this process is to accurately classify the products by comparing the multi-dimensional features of footwear products with known feature templates, and provide a confidence score for each recognition result to ensure the reliability and accuracy of the recognition.

[0051] Feature extraction uses deep learning models to extract multi-dimensional features from footwear images, including but not limited to color, material, style, shape, last type, and heel height. These features form a multi-dimensional feature vector in the feature space, which represents the unique attributes of footwear.

[0052] Compare with known feature templates. Known feature templates are predefined sets of standard features that represent typical features of different categories of footwear. By calculating the similarity between the extracted feature vector and the known feature template, the system can identify which specific category the footwear belongs to. This comparison is achieved by calculating the distance or similarity measure (such as cosine similarity, Euclidean distance, etc.) between feature vectors. The higher the similarity, the more closely the features of the product match the template, thus achieving classification.

[0053] Confidence scoring. After recognition and classification are completed, the system performs a confidence score on each recognition result. The confidence score is a probability value that indicates the degree of credibility of the recognition result. The system can calculate the confidence score by normalizing the similarity of the feature vector and template matching. This score helps the system identify the most likely category among multiple possible classification results, and provides users with information on the reliability of the recognition result.

[0054] Through the above feature extraction and classification process, the present invention realizes accurate recognition of footwear products. The method of comparing feature templates enables the system to quickly and accurately classify footwear products into predefined categories, greatly improving the efficiency of recognition. At the same time, the confidence score provides reliability information of the recognition result, allowing users to judge the credibility of the recognition result based on the score, thereby improving the user's trust and usage experience.

[0055] Overall, this process not only improves the system's ability to identify footwear products, but also improves the system's practicality and reliability through quantitative evaluation of the recognition results. By combining feature comparison and confidence scoring, the present invention provides an efficient and accurate solution for footwear product recognition.

[0056] Preferably, the trained residual network model is optimized by the following steps before being converted into an open neural network exchange format and a model weight format:

[0057] Use stochastic gradient descent optimizer to tune model parameters;

[0058] The cosine annealing learning rate scheduling strategy is applied to improve the convergence speed of the model.

[0059] In the present invention, in order to ensure that the trained residual network model can run efficiently in various environments and maintain recognition accuracy, the model needs to be optimized before converting it into the open neural network exchange format and model weight format. The core of the optimization process is to adjust the model parameters using a stochastic gradient descent optimizer and apply a cosine annealing learning rate scheduling strategy to improve the convergence speed of the model.

[0060] The stochastic gradient descent optimizer (SGD) is used to adjust the model parameters. Stochastic gradient descent is an iterative optimization algorithm used to continuously update the weight parameters of the model during the training process. By calculating the gradient of a small batch of samples in each iteration, SGD can effectively reduce the computational overhead while providing better convergence performance. In the present invention, SGD continuously fine-tunes the parameters in the residual network so that the model can better fit the training data, ultimately improving the ability to recognize the characteristics of footwear products.

[0061] The cosine annealing learning rate scheduling strategy is introduced to improve the convergence speed of the model. Cosine annealing is a method of dynamically adjusting the learning rate. Its core idea is to gradually reduce the learning rate during training so that the model is more stable when it is close to convergence. Specifically, cosine annealing dynamically adjusts the learning rate by simulating the periodic changes of the cosine function, so that it first decreases rapidly and then decreases slowly in each training cycle. This adjustment method can not only accelerate the early training convergence, but also carefully explore better parameter configurations in the later stage to avoid falling into the local optimum too early.

[0062] By applying the stochastic gradient descent optimizer and the cosine annealing learning rate scheduling strategy, the residual network model of the present invention has achieved remarkable results in parameter optimization. First, the use of SGD ensures that the model can quickly adjust parameters during the training process to adapt to changes in data characteristics and improve the generalization ability of the model. Secondly, the cosine annealing strategy improves the training efficiency and stability of the model by optimizing the dynamic adjustment of the learning rate, so that the model can reach the optimal performance faster.

[0063] This optimization process not only improves the accuracy and robustness of the model in identifying footwear products, but also provides a stable foundation for subsequent format conversion. By converting the optimized model into the open neural network exchange format and model weight format, the system can achieve rapid cross-platform deployment and ensure efficient operation in different hardware and software environments.

[0064] Preferably, the model is rapidly deployed by integrating the model file in the open neural network exchange format into the existing production environment and calling it through an application programming interface.

[0065] In the present invention, in order to enable the AI ​​model to be put into use quickly and realize the recognition of shoe parameters, the rapid deployment of the model is a key link. By converting the trained model into the Open Neural Network Exchange Format (ONNX), integrating it into the existing production environment, and then calling it through the application program interface (API), the system can efficiently and flexibly realize the deployment and application of the model.

[0066] The Open Neural Network Exchange format (ONNX) is a widely used deep learning model file format designed to promote model interoperability between different deep learning frameworks. By converting the model to the ONNX format, developers can ensure that the model can be seamlessly integrated and run in different hardware and software environments. The compatibility of this format makes model deployment more flexible and reduces deployment difficulties caused by framework limitations.

[0067] After the model is converted to ONNX format, integration into the existing production environment is the key next step. The production environment usually refers to the technical infrastructure that is already running in the enterprise, including servers, data storage, and network systems. By deploying the model file in ONNX format to these environments, the model can directly use existing computing resources and data streams to perform real-time shoe parameter recognition.

[0068] Through the application programming interface (API), users or other systems can easily interact with the deployed model. The API provides a standardized access method that allows external programs to send footwear product image data and receive the model's recognition results. The use of the API not only simplifies the complexity of system integration, but also improves the response speed of the model, allowing shoe parameter recognition to be quickly and reliably applied to actual business scenarios.

[0069] Through the above-mentioned rapid deployment process, the AI ​​model of the present invention can be quickly put into practical application and provide efficient shoe parameter recognition services. First, the use of the ONNX format greatly improves the deployment efficiency and environmental adaptability of the model, enabling the model to run efficiently on different hardware platforms (such as CPU, GPU). Secondly, the integration in the production environment ensures that the model can access the required data in real time and seamlessly connect with the company's existing systems. Finally, through API calls, users can interact with the model in a simple and intuitive way, greatly improving the flexibility of the system and user experience.

[0070] Preferably, the incremental training and updating process of the model includes:

[0071] Freeze all layers except the fully connected layers;

[0072] Use the newly labeled dataset for training;

[0073] Output the updated model file.

[0074] In the present invention, the incremental training and updating process of the model is a key step to adapt to the changes in the characteristics of shoe products and the introduction of new labels. Through this method, the model can quickly adapt to new data and new feature labels without complete retraining, thereby maintaining the accuracy and efficiency of recognition performance.

[0075] The incremental training process first freezes all layers except the fully connected layers. Freezing the convolutional layers and other parameter layers in the model means that the weights of these layers remain unchanged during training, and only the fully connected layers are trained and updated. The advantage of this strategy is that it maintains the model's learning results for existing data and features, while adapting to data with new labels by adjusting the fully connected layers. Convolutional layers are usually responsible for extracting low-level features, which are usually common in different datasets, so there is no need to retrain. The fully connected layers are responsible for mapping these features to specific output categories, so only fine-tuning is required on the newly added data.

[0076] The model is trained using the newly labeled dataset. This process usually involves new footwear features and label data, which are used to update the fully connected layer parameters of the model. Through training, the fully connected layer can learn how to accurately classify and predict in the new feature space. The dataset used in the incremental training process should fully represent the new feature labels, so as to ensure the recognition ability of the new labels after the model is updated.

[0077] Output the updated model file. This step saves the results of incremental training for subsequent deployment and use. The output model file is usually saved in a weight format (such as a PTH file) and a deployable format (such as an ONNX file) to ensure that the model can be quickly called and applied in a production environment.

[0078] Through incremental training and updating, the present invention achieves a significant improvement in the adaptability and flexibility of the model. First, the strategy of freezing most layers and only updating the fully connected layers greatly shortens the training time, allowing the model to adapt to changes in new labels in a shorter time. Secondly, incremental training using data with new labels ensures that the model can expand to new feature spaces while retaining the old feature recognition capabilities, improving the versatility and adaptability of the model. Finally, the updated model file can be quickly deployed to the production environment without the need for complete retraining, thereby saving computing resources and costs.

[0079] Overall, the incremental training and updating process provides a flexible and efficient solution for shoe parameter identification, which can quickly respond to market changes and new demands, and provide enterprises and users with better identification services.

[0080] Compared with the prior art, the advantages and beneficial effects of the present invention are:

[0081] The present invention realizes multi-dimensional recognition and accurate classification of footwear product features by introducing deep learning models and mutual channel loss function technical means, overcoming the problems of low recognition accuracy and single features in the prior art;

[0082] The present invention utilizes an improved residual network structure, which improves the model's ability to learn complex features and adapt to changing market environments;

[0083] The invention uses the incremental training mechanism of the model, so that the system can quickly adapt to new feature labels, thereby enhancing the flexibility and scalability of the system;

[0084] The present invention combines the open neural network exchange format to achieve efficient deployment and cross-platform application of the model, so that the recognition system can maintain efficient operation in different hardware environments;

[0085] The present invention simplifies the integration and calling of models by utilizing an application program interface, thereby improving user experience and system response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0087] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0088] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0089] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0090] The technical implementation of the present invention is based on two mainstream deep learning frameworks: Tensorflow and Pytorch. These two frameworks support complex neural network model training and deployment. Tensorflow was developed by Geogle and is used for preliminary design and prototype testing of the model. Pytorch was developed by Facebook and is used for training and optimization of the final model.

[0091] In the data preparation stage, since there are many pictures with complex backgrounds in the footwear dataset, in order to reduce the impact of the background, the present invention uses the YOLOv5s model to first detect the position of the shoes in the picture. YOLOv5s uses a convolutional neural network structure to predict whether each area contains shoes and the bounding box coordinates of the shoes. Then, the detected shoe area is cropped out to form a new image, reducing the interference of the background and providing a clearer input for subsequent feature extraction and classification.

[0092] The labels corresponding to the images are saved in an xlsx or csv table. All labels are converted into json format and put into the dataset through the script and configuration file. The label information and image information are matched and saved in a folder.

[0093] The present invention collects footwear images and label data, wherein the labels include shoe category, color, year, season, style, material, heel height, head shape, last type, etc.

[0094] The data set is passed into the improved ResNet model for training. The present invention is based on the original ResNet network for improvement. The model consists of multiple basic residual blocks, each of which includes a convolutional layer, batch normalization (BatchNormalization), ReLU activation function, etc. The main improvement of the present invention is made to the loss function of ResNet. The loss function of the original ResNet network is the cross entropy function:

[0095]

[0096] The cross entropy loss function is a classification loss function used to measure the difference between the model output and the true label. In the formula, y represents the true label, O i Represents the predicted output of the model, and the cross entropy loss function optimizes the model parameters by minimizing the difference between the predicted output and the true label.

[0097] The present invention replaces the cross entropy function with the mutual-channel loss function (MC-Loss). The mutual-channel loss consists of two channel-specific components: a discriminative component and a diversity component. The discriminative component forces all feature channels belonging to the same class to be discriminative through a channel attention mechanism. The diversity component imposes constraints on the channels and is mutually exclusive in space. The final result is a set of feature channels, each of which reflects a different local discriminative region for a specific class. The mutual-channel loss function takes into account the mutual relationship between channels, and by optimizing these relationships, the expressiveness of the features is improved, which can improve the recognition accuracy when the class differences in the data set are small.

[0098] The purpose of the mutual channel loss function is to strengthen the model's learning of the relationship between channels. In deep learning, each convolutional layer of a convolutional neural network (CNN) usually contains multiple channels, and the features learned by each channel may be redundant or complementary. The mutual channel loss function aims to optimize the information exchange between these channels, improve the quality of feature expression and the accuracy of classification.

[0099] For a given input image, we first extract a feature map by feeding the image into a base network; for example, VGG16 or ResNet18. Let the extracted feature map be , height H, width W, number of channels N. According to the network structure diagram, MC-Loss is just a conventional image classification network structure with a mutual channel loss LMC added. Feature channels is the feature map output by the last convolutional layer of the previous Conv.layers. LCE makes the network focus on the global discriminative area, while LMC makes the network focus on the local discriminative area.

[0100]

[0101] in, represents the mutual channel loss function; represents the discriminative loss; indicates a loss of diversity; is the loss balance factor.

[0102] The discriminative component of the left channel and the diversity component of the right channel. It shows the changes of feature maps before and after using LMC. It can be seen that after using LMC, the discriminative area is obtained, and the discriminative areas of different feature maps are different.

[0103] Assume that the output feature map F of the discriminative component of the left channel is N channels, with a total of c categories, and ξ represents the number of feature maps in each category. Then: Each class is dedicated to ξ feature maps, and this strategy is implemented by the discriminative component.

[0104] After using LMC, the discriminative regions are obtained, and the discriminative regions of different feature maps are different.

[0105] The composition of the discriminative component:

[0106] CWA: Channel-Wise Attention. In MC-Loss, CWA is somewhat similar to Dropout random inactivation, but Dropout is in the spatial domain, while CWA is in the channel domain. For example, there are 10 categories (c=10), with a total of 40-channel feature maps (N=40), and each category has 4-channel feature maps (ξ=4). After CWA with a deactivation probability of 0.5, although the output is also N channels, all values ​​in the feature maps of N / 2 channels are returned to 0. And deactivation is also related to the category. Correspondingly, the probability of channel deactivation in each category is also 0.5, which means that 2 channels (ξ / 2) of each category are deactivated.

[0107] The role of CWA is to force each channel to learn sufficient discriminative information. Because in each iteration, half (ξ / 2) of the original feature maps of each category are set to zero. In order to be able to classify, the remaining feature maps have a greater task and need to learn more discriminative information.

[0108] CCMP: Cross-Channel Max Pooling. Put the maximum response values ​​of all channels in each category on a feature map. In principle, the more discriminative the point, the greater the response.

[0109] The role of CCMP: channel dimension reduction to obtain the feature map of the c channel.

[0110] GAP: Global Average Pooling, which can pool the feature map of (b, c, w*h) into the feature map of (b, c, 1).

[0111] The role of GAP: spatial dimensionality reduction.

[0112] Softmax: Scoring, used for classification.

[0113]

[0114]

[0115] Where, F: feature map; W: image width; H: image height; c: number of channels.

[0116] Function of the discriminative component: The collaboration of CWA and CCMP enables the network to focus on the discriminative areas of various categories. In the process of comparing the feature vector obtained by CCMP+GAP+softmax with the category label to obtain the loss function, since there is no convolution operation, in order to make the softmax score result close to the label one-hot value, the ξ feature maps belonging to a certain category will have a greater response.

[0117] The composition of the diversity components:

[0118] Although the discriminative component can focus on the discriminative areas of various categories, it still cannot guarantee that most of the discriminative areas are located, so the diversity component is introduced.

[0119] Softmax: Regularization.

[0120] CCMP: It has the same function as CCMP above, and obtains feature maps of c channels.

[0121] Sum: Sum all elements in each feature map, with only one element per channel.

[0122] Average: Average the values ​​of all channels.

[0123]

[0124]

[0125] Among them, F: feature map; W: image width; H: image height; c: number of channels.

[0126] The larger Ldiv(F) is, the better. The larger Ldiv(F) is, the more dispersed the focused area is in the feature maps of the ξ channels in each category.

[0127] So the expression of MC-Loss is:

[0128]

[0129] Model training is scheduled using the SGD optimizer and cosine annealing learning rate to optimize the model training process and improve the generalization ability of the model. When adding new categories, the weight (pth) file generated by the model is used to freeze the parameters and retrain them, so that the model can be updated quickly.

[0130] After the model training is completed, the generated onnx file is used to convert the model between different platforms and frameworks to facilitate model deployment. After the model is deployed, the user only needs to upload a picture of the shoes (the picture needs to be able to clearly identify the details of the shoes by the human eye), and the system can automatically identify and return multi-dimensional label information.

[0131] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware.

[0132] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for identifying shoe parameters using an AI model, characterized in that: The following steps are involved: Obtain the original image of the footwear product, use the deep learning model YOLOv5s to process the image, detect the main body position of the footwear product, and crop the main part of the footwear product to remove the background interference of the image; The cropped footwear images and the characteristic labels of the footwear products are standardizedly labeled, wherein the characteristic labels include the category, color, year, season, style, material, heel height, head shape, and last type of the footwear products, and stored in JSON format to form a data set for training; Introducing the mutual channel loss function into the improved residual network model, and using the data set to train the model to improve the model's ability to recognize multi-dimensional features of footwear products; The trained residual network model is used to extract features from the input footwear product image, identify and output multi-label information related to the footwear product; Convert the trained residual network model into the open neural network exchange format and model weight format to enable rapid deployment of the model in a production environment and support rapid incremental training and updates of newly added labels.

2. The method according to claim 1, characterized in that The YOLOv5s model is used to detect the main body position of the footwear product and extract the features of the footwear product through a convolutional neural network.

3. The method according to claim 1, characterized in that The standardized labeling process of the characteristic label of the footwear product includes: Use image recognition technology to extract features of footwear items; The extracted features are converted into standardized labels using the preset labeling standards and stored in JSON format.

4. The method according to claim 1, characterized in that: The mutual channel loss function is introduced into the improved residual network model and is calculated by the following formula: , in, represents the mutual channel loss function; represents the discriminative loss; indicates a loss of diversity; is the loss balance factor.

5. The method according to claim 4, characterized in that The discriminative loss Calculate by following the steps below: Apply channel attention mechanism to each feature channel; The cross entropy loss function is used to calculate the discriminative loss for each feature channel.

6. The method according to claim 4, characterized in that The diversity loss Calculate by following the steps below: Perform maximum pooling on the feature channels in each category; Regularize the pooling results.

7. The method according to claim 1, characterized in that In the feature extraction process, classification is achieved by comparing the multi-dimensional features of the footwear product with known feature templates, and a confidence score is given to each recognition result.

8. The method according to claim 1, characterized in that The trained residual network model is optimized by the following steps before being converted into the open neural network exchange format and the model weight format: Use stochastic gradient descent optimizer to tune model parameters; The cosine annealing learning rate scheduling strategy is applied to improve the convergence speed of the model.

9. The method according to claim 1, characterized in that: The model is quickly deployed by integrating the model file in the open neural network exchange format into the existing production environment and calling it through an application program interface.

10. The method according to claim 1, characterized in that The incremental training and updating process of the model includes: Freeze all layers except the fully connected layers; Use the newly labeled dataset for training; Output the updated model file.