A clothing image category electronic labeling method based on regularized extreme learning machine
By combining the transfer learning ResNet101 and optimized RELM, the accuracy and generalization problems of clothing image classification algorithm are solved, and the fast and accurate electronic annotation of clothing images on e-commerce platforms is achieved, which improves transaction efficiency and accuracy.
Patent Information
- Application Number
- CN202311120923.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2043-09-01
AI Technical Summary
The existing clothing image classification algorithms have problems with low classification accuracy, overfitting and local optimal solutions on e-commerce platforms, resulting in the mismatch of electronic label categories and actual categories, affecting transaction efficiency.
Combining the transfer learning ResNet101 feature extraction network and the optimized regularization extreme learning machine (RELM), the input weight, hidden layer bias and regularization coefficient of RELM are optimized through the INFO algorithm, and a RESNET-INFORELM model is constructed for electronic annotation of clothing image categories.
It realizes fast and accurate electronic labeling of clothing images, reduces manual labeling costs, improves classification accuracy and generalization capabilities, and is suitable for product retrieval and transactions on e-commerce platforms.
Smart Images

Figure CN117315326B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of clothing image classification, and in particular relates to a clothing image category electronic labeling method based on a regularized extreme learning machine. Background Art
[0002] With the development of the apparel e-commerce industry, clothing categories have become increasingly diverse, resulting in an increasing number of clothing images generated online. In practice, for both merchants and customers, quickly and accurately obtaining product labels facilitates rapid product retrieval, inventory management, and improved transaction efficiency on e-commerce platforms. Therefore, accurately and effectively classifying and labeling these large numbers of clothing images has become a crucial issue. However, manual labeling of clothing images is costly and inefficient, and existing clothing image classification algorithms also fail to meet performance requirements. Therefore, research on electronic labeling of clothing image categories is of great significance.
[0003] Currently, the following convolutional neural networks are commonly used in the field of electronic labeling of clothing images, such as EfficientNet and GoogleNet. GoogleNet's relatively simple neural network architecture may not be suitable for production needs. EfficientNet offers high accuracy, efficiency, and scalability, but also suffers from long training times, unsuitability for small datasets, and a large number of parameters. ResNet offers the advantages of a deeper network structure and efficient resource utilization. ResNet introduces residual connections, which allow computations in certain layers to be skipped, alleviating the problems of vanishing and exploding gradients. This facilitates better gradient propagation during training, making training more stable. Its innovative residual structure makes it easier and more efficient to build deep neural networks, achieving outstanding performance in multiple computer vision tasks. Extreme learning machines (ELMs) have advantages such as fast training, strong generalization, and a small number of hyperparameters. However, when it comes to image classification, the ELM's randomly generated input weights and hidden layer biases significantly impact its classification performance, leading to overfitting and local optimal solutions. Overfitting can cause a model to perform very well on the training data but poorly on unseen new data. However, being stuck in a local optimum can cause models trained near that optimum to overfit the training data and fail to generalize well to new, unseen data. This means the model cannot generalize well to real-world clothing images, thus affecting classification accuracy. In practical applications, when the amount of clothing data on e-commerce platforms is excessive, problems such as mismatches between electronically labeled categories and actual categories can occur, leading to errors and misleading sellers and customers. This can impact the normal operation of transactions between buyers and sellers on e-commerce platforms. Therefore, it is urgent to propose a method for electronically labeling clothing image categories based on a regularized extreme learning machine with excellent classification performance. Summary of the Invention
[0004] The purpose of the present invention is to address the problems of low classification accuracy of existing electronic labeling methods for clothing image categories. When the amount of clothing data on the e-commerce platform is too large, the electronic labeling categories are prone to mismatch with the actual categories. A clothing image category electronic labeling algorithm is proposed, which combines the ResNet101 feature extraction backbone network based on transfer learning with the regularized extreme learning machine (RELM) optimized by the vector weighted average algorithm (INFO). This can achieve rapid, automatic and accurate electronic labeling of all clothing products when the e-commerce platform is running, so that both buyers and sellers can directly obtain the correct category of the products, which is conducive to product retrieval and reduces the large amount of cost and time spent on manual labeling.
[0005] The present invention provides a method for electronically labeling clothing image categories based on a regularized extreme learning machine, comprising the following steps:
[0006] Step 1: Obtain an image dataset, which includes clothing images of several categories. The length and width of the images are all set to a uniform size, regularized, mapped to a normal distribution function, and then converted into a matrix for input into the ResNet101 model.
[0007] Step 2: Get the ResNet101 feature extraction network based on transfer learning
[0008] Construct a network model ResNet101 and use the ImageNet dataset for pre-training to obtain the initial network model ResNet101 and the weight parameters of the initial network model ResNet101.
[0009] Performing transfer learning on the initial network model ResNet101, and then fine-tuning the network parameters of the initial network model ResNet101 to obtain a ResNet101 feature extraction network;
[0010] Step 3: Use the ResNet101 feature extraction network to extract image features
[0011] Divide the data set obtained in step 1 into a training set and a test set, input the data in the training set into the ResNet101 feature extraction network obtained in step 2 to obtain clothing image features;
[0012] Step 4: Optimize the RELM classifier using the INFO algorithm
[0013] (4.1) Obtain the parameters of the INFO algorithm, the activation function and hidden layer nodes of the RELM classifier, the INFO algorithm parameters include the initial population size and the maximum number of iterations; perform corresponding parameter settings in subsequent experiments.
[0014] (4.2) Constructing an optimized RELM classifier model INFORELM of the INFO algorithm, using the clothing image features obtained in step 3 and the INFO algorithm to calculate the input weights, hidden layer biases and regularization coefficients of the INFORELM model, and the output weight β of the INFORELM model, thereby obtaining the optimized INFORELM model;
[0015] Step 5: Obtain the image to be processed, process it using the optimized INFORELM model, and output the electronic annotation of the image.
[0016] The image is electronically annotated directly, so that the annotation information is displayed directly on the image, allowing users to clearly understand the true category of the clothing.
[0017] Preferably, in step 1, the image is from the Fashion-Mnist dataset, and the several categories include the following 10 categories: Ankle Boot, Bag, Coat, Dress, Pullover, Sandal, Shirt, Sneaker, Trouser, T-Shirt.
[0018] Preferably, in step 4, obtaining the INFO algorithm parameters includes the following steps:
[0019] The initial population size is set to 5, 10, 15, 20, 25, 30, 35, 40, 45, and 50, and the maximum number of iterations is set to 10, 20, 30, 40, 50, 70, 80, 90, and 100. Different combinations of initial population sizes and maximum number of iterations are tested, and the classification performance of the INFO algorithm under different combinations is tested. The combination with the best classification performance is selected as the INFO algorithm parameters.
[0020] Preferably, in step 4, the INFO algorithm parameters are specifically: initial population size 25, maximum number of iterations 70.
[0021] Preferably, in step 4, the activation function of the RELM classifier is Sigmoid; and the number of nodes in the hidden layer is 80.
[0022] The algorithm proposed in this paper combines the ResNet101 model and the INFORELM model to classify clothing image datasets. It combines the rich feature extraction capabilities of ResNet101 with the superior classification performance of INFORELM. The RESNET-INFORELM algorithm consists of three main parts. The first part uses the ResNet101 feature extractor to extract clothing image feature information in the global average pooling layer. The second part uses the INFO optimization algorithm to optimize the RELM classifier. This algorithm optimizes the input weights, hidden layer bias, and regularization coefficient of the RELM classifier, thereby selecting appropriate parameters for these three parameters and improving the classification performance of the RELM classifier. The third part uses the trained INFORELM model to calculate the extracted test set features and output the clothing image classification results. The images are then electronically annotated, with the annotation information displayed directly on the images, allowing users to clearly identify the true category of the clothing.
[0023] The present invention has the beneficial effects:
[0024] This paper proposes a method for electronically labeling clothing image categories based on a transfer learning-based ResNet101 network and an INFO-optimized RELM. This algorithm first uses transfer learning to transfer the initial weight parameters of a ResNet101 network pre-trained on the ImageNet dataset to the original network model. The parameters are then fine-tuned to obtain a ResNet101 feature extractor, significantly reducing the computational resources consumed in extracting clothing image features. A regularization coefficient is then introduced into the traditional ELM extreme learning machine to address overfitting. The INFO optimization algorithm is then used to optimize the parameters of the regularized ELM, or RELM, by optimizing its input weights, hidden layer biases, and regularization coefficients. Finally, the optimized RELM is combined with the ResNet101 feature extractor to obtain the proposed RESNET-INFORELM algorithm model. Experimental results show that the proposed RESNET-INFORELM algorithm outperforms other clothing image classification algorithms on the Fashion-Mnist dataset. It also exhibits stability, effectiveness, and good generalization. The classification results can be used to directly label clothing images with categories, with fast and accurate electronic labeling. This allows for rapid, automatic, and accurate electronic labeling of all clothing items on the e-commerce platform, enabling both buyers and sellers to directly obtain the correct product categories, facilitating product retrieval and eliminating the significant cost and time associated with manual labeling.
[0025] This paper uses ResNet101 to extract clothing image features. This neural network has the advantages of a deeper network structure and efficient resource utilization. ResNet introduces residual connections, which allow the calculation of certain layers to be skipped, thereby alleviating the problems of vanishing and exploding gradients. This helps to better propagate gradients during training, making training more stable. Its innovative residual structure makes it easier and more efficient to build deep neural networks, and has achieved excellent performance in multiple computer vision tasks.
[0026] The present invention uses the INFO algorithm to optimize the input weight, hidden layer bias and regularization coefficient of RELM, thereby selecting appropriate three parameters for RELM and improving the classification performance of the RELM classifier.
[0027] This invention enables automatic and accurate electronic labeling of clothing images by category. This approach significantly reduces the cost and time associated with manual labeling on e-commerce platforms, facilitating product retrieval and transactions. The model boasts excellent classification accuracy, generalizability, and stability, improving the efficiency and accuracy of electronic labeling and poised for widespread application in clothing trading on e-commerce platforms. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a flow chart of the present invention;
[0029] Figure 2 It is a diagram of the residual block structure of the building block in the ResNet network used in the present invention;
[0030] Figure 3 It is a diagram of the bottleneck residual block structure in the ResNet network used in the present invention;
[0031] Figure 4 It is the ResNet101 network structure diagram in the present invention;
[0032] Figure 5 It is the network structure of the ELM used in the present invention;
[0033] Figure 6 It is a model diagram of the RESNET-INFORELM algorithm constructed by the present invention;
[0034] Figure 7 is the confusion matrix of ResNet50 on the Fashion-Mnist test set;
[0035] Figure 8 is the confusion matrix of ResNet101 on the Fashion-Mnist test set;
[0036] Figure 9 is the confusion matrix of DenseNet201 on the Fashion-Mnist test set;
[0037] Figure 10 is the confusion matrix of RESNET-INFORELM on the Fashion-Mnist test set;
[0038] Figure 11 It is a box plot of the algorithm stability of various algorithms on the Fashion-mnist test set;
[0039] Figure 12 It is the process of converting the individual positions of the INFO algorithm population to RELM parameters; DETAILED DESCRIPTION
[0040] The present invention will be further described below with reference to the accompanying drawings.
[0041] like Figure 1As shown, a method for electronically labeling clothing image categories based on a regularized extreme learning machine is described. The method comprises the following steps: preparing a dataset and performing preprocessing; obtaining a ResNet101 feature extraction network based on transfer learning; performing image feature extraction using ResNet101; training an INFORELM model; and outputting clothing image classification results and electronically labeling them. The method comprises the following steps:
[0042] The present invention comprises the following steps:
[0043] Step 1: Prepare the dataset and perform preprocessing
[0044] (1.1) Selecting a Dataset
[0045] This paper needs to use a corresponding data set suitable for clothing image classification, so it uses Fashion-Mnist
[0046] Dataset.
[0047] Fashion-Mnist is a clothing image dataset that contains 10 categories.
[0048] They are: Ankle Boot, Bag, Coat, Dress, Pullover, Sandal, Shirt, Sneaker, Trouser,
[0049] T-Shirt. The dataset contains 70,000 images, 60,000 for training and 6,000 for each category;
[0050] 10,000 images, 1,000 images for each category.
[0051] (1.2) Dataset preprocessing
[0052] The length and width of the photos in the dataset are all set to 224×224, and the images are regularized.
[0053] Map it to the normal distribution function, and then convert it into a high-order matrix and input it into the ResNet101 model.
[0054] Inference operations.
[0055] Residual Network (ResNet) is a convolutional neural network that won the 2015 ImageNet competition.
[0056] Won the first place in the image classification task. Compared with the traditional convolutional neural network (CNN), the residual network has
[0057] It has the following advantages:
[0058] It can make the network converge faster, improve the performance of the network, reduce the number of parameters, and reduce the residual error.
[0059] Cross-layer connections in the block can make the parameters of some layers in the network redundant, thereby reducing the number of network parameters.
[0060] The network is more lightweight.
[0061] The most critical part of the residual neural network is its residual block structure, which can be divided into
[0062] Divided into "building block" and "bottleneck", see Figure 2 and Figure 3 .
[0063] from Figure 2 and Figure 3 As you can see, the residual block structure contains a curved line, which is a unique mapping method for residual networks: identity mapping. The mapping method used to remove the curve is called residual mapping, so this part refers to the residual part. Assuming our output is y, the residual part is F(x), and the curved part is x itself, we can get the output formula as:
[0064] y=F(x)+x
[0065] The reason why there are two structures of residual blocks is obvious, which is to reduce the number of parameters. Figure 2 , which is generally used in ResNet34 networks. If the input is 3×3×256, then it undergoes two steps of 3×3×256 convolution, and the number of parameters is 3×3×256×256×2=1179648. Figure 3 , which is the residual block structure in the ResNet101 network used in this paper. The number of parameters is 1×1×256×64+3×3×64×64+1×1×64×256=69632. It can be seen that the number of parameters is reduced by more than ten times, which greatly reduces the amount of calculation.
[0066] In the overall structure of the residual network, the most critical part is the residual block group, which is combined with the convolutional layer, pooling layer, and fully connected layer to form the entire network.
[0067] The network structure of ResNet101 used in this invention is described in detail below. Figure 4 shown.
[0068] Resblock1, Resblock2, Resblock3, and Resblock4 are all modules composed of several Bottleneck layers. Each Bottleneck contains several convolutional layers and batch normalization layers, and also introduces residual connections to avoid optimization issues in deep networks. ResNet101 increases the depth and complexity of the model by stacking these residual blocks, thereby improving classification and detection performance. It is important to note that the BN layer is placed between the convolutional layer and the activation function to facilitate gradient descent and accelerate network training.
[0069] Step 2: Get the ResNet101 feature extraction network based on transfer learning
[0070] Transfer learning is a machine learning method whose fundamental idea is to use knowledge learned from one domain to improve models in another. In transfer learning, the knowledge learned from the source task is first analyzed and then transferred to the target task. The parameters learned from the source task can be used to initialize the parameters of the new task, which helps reduce the time required to train the new task while improving generalization ability.
[0071] The invention adopts transfer learning to effectively save the time of training new models. Compared with retraining from scratch, it can better generalize and suppress overfitting.
[0072] Specifically, based on transfer learning, the weight parameters of the initial network model ResNet101 pre-trained by the ImageNet dataset are migrated to our initial network model, and the network parameters are fine-tuned to obtain the feature extraction network of ResNet101. This network is used as a feature extractor for subsequent image feature extraction.
[0073] The ResNet101 feature extraction network is obtained through transfer learning, which greatly reduces the computing resources consumed by the model and the training time when extracting clothing image features, while improving the generalization ability of the model. Compared with other traditional convolutional neural networks, the ResNet101 feature extraction network based on transfer learning can utilize more levels of clothing image features, making the final extracted clothing image features more comprehensive.
[0074] Step 3: ResNet101 for image feature extraction
[0075] Because the ResNet101 network structure is deeper and better able to extract features from clothing images, this paper uses a ResNet101 network based on transfer learning as a feature extractor to extract clothing image features. The ResNet101 feature extraction network is trained in the previous step, and the fine-tuned ResNet101 network model is used as a feature extractor to extract clothing image features output by its global average pooling layer.
[0076] Step 4: Train the INFORELM model
[0077] The ultimate goal of this invention is to use a trained INFORELM model to electronically label clothing images. To achieve accurate and efficient electronic labeling, two key factors must be addressed: first, extracting clothing image features, and second, selecting an appropriate classifier to effectively classify the extracted features. Feature extraction has been described in the previous step; this step focuses on classifier selection, optimization, and training.
[0078] To achieve optimal results in electronic labeling of clothing image categories, it is crucial to select an accurate and effective feature classifier. The Regularized Extreme Learning Machine (RELM) is a highly effective classifier, but its random generation of weights and biases leads to poor stability. Neural network parameters play a crucial role in their classification performance. Therefore, intelligent optimization algorithms can be used to find the optimal solution for these parameters, thereby improving the neural network's classification performance.
[0079] The present invention adopts the INFO optimization algorithm, which continuously optimizes the input weights, hidden layer biases and regularization coefficients of RELM, thereby improving the classification performance of RELM. Finally, the desired INFORELM model is obtained through training.
[0080] First, the regularized extreme learning machine RELM and INFO optimization algorithm used in the present invention are briefly introduced.
[0081] 1. Regularized Extreme Learning Machine RELM
[0082] The Extreme Learning Machine (ELM) is a single hidden layer feedforward neural network proposed by Huang et al. in 2004. Its purpose is to improve the BP algorithm (Backward Propagation, BP) to improve the originally low learning efficiency and simplify the parameter setting. The network structure of this model is as follows Figure 5 shown.
[0083] Now suppose there is a set of training samples (x i ,y i ), x i =(x i1 , x i2 ,…,x in ) T ∈R n is the input vector for training, y i =(y i1 ,y i2 ,…,y im ) T ∈R m is the output vector, then the mathematical model of ELM with L hidden layer neurons can be expressed as:
[0084]
[0085] In the above formula, β i is the output weight, G i (a i , b i , X) is the activation function, a i is the input weight of the network, b i is the threshold of the i-th hidden layer.
[0086] The above formula can also be expressed as:
[0087] Hβ=Y
[0088] In the above formula, H is the output of the hidden layer in the network, β represents the output weight, and Y is the actual output. Their respective calculation formulas can be expressed as:
[0089]
[0090]
[0091]
[0092] And for the formula Using the least squares method and singular value decomposition, we can get
[0093] β=(H T H) -1 H T T
[0094] When there are many outliers in the training samples, the hidden layer output matrix is ill-posed, which may affect the robustness and generalization of the model. Regularization theory can better solve the above problems. Therefore, a regularization coefficient is added to the ELM model to improve the stability of the model, thus obtaining the RELM:
[0095] β=(H T H+CI) -1 H T T
[0096] The above formula is the required regularized extreme learning machine RELM, where C is the regularization coefficient and I is the unit matrix.
[0097] 2.INFO optimization algorithm
[0098] The Weighted Mean of Vectors (INFO) algorithm, proposed in 2022, is a new intelligent optimization algorithm with advantages such as fast convergence and strong optimization capabilities. This algorithm uses different weighted averaging rules to calculate vectors and derive optimized results, thereby achieving optimization. The INFO algorithm process is divided into three main phases: updating the rules, vector merging, and local search. These three phases are described in detail below.
[0099] (1) Update rule phase
[0100] The INFO algorithm uses a rule based on the weighted mean of random vectors (MeanRule) to update vectors. It also incorporates a convergence acceleration (CA) into the update rule to improve global search capabilities. The main formulas in the update rule phase are defined as follows:
[0101]
[0102]
[0103] σ=2α×rand-α
[0104]
[0105] in, and is the vector of the new position after the g-th iteration, σ is the vector scaling rate, which is calculated by the formula σ=2α×rand-α, and α can be calculated according to the formula The exponential function defined in [1] is used to calculate the update. a1≠a2≠a3≠1, where these three numbers are random integers selected from [1, NP]. randn is a standard normally distributed random value, and the entire factor containing randn is the convergence acceleration component CA.
[0106] As you can see, the above formula includes the mean rule MeanRule, which is defined as follows:
[0107]
[0108] Where r is a random number between [0,0.5], and is defined as follows:
[0109]
[0110] Among them, w1, w2, w3 are defined as follows:
[0111]
[0112]
[0113]
[0114] ω=max(f(x a1 ),f(x a2 ),f(x a3 ))
[0115]
[0116] Among them, w1, w2, w3 are defined as follows:
[0117]
[0118]
[0119]
[0120] ω=f(x ws )
[0121] δ=2β×rand-β
[0122]
[0123] (2) Vector merging stage
[0124] In this stage, INFO converts the two vectors calculated in the first stage into and With vector The combination generates a new vector, which is defined as follows:
[0125]
[0126] in, is the new vector obtained by merging the vectors in the g-th generation population; μ = 0.05×randn.
[0127] (3) Local search stage
[0128] In this stage, the INFO algorithm uses local search to avoid falling into the local optimal solution. According to the definition, if rand < 0.5, then Generate a new vector where rand is a random value in [0,1]. The new vector is defined as follows:
[0129]
[0130] in:
[0131]
[0132]
[0133] in, is a random number between (0,1); xrnd is a new vector solution composed of xavg, xbt, and xbs. This vector solution improves the randomness of the algorithm and can better search for solutions in the solution domain. v1 and v2 are two random numbers, which are defined as follows:
[0134]
[0135]
[0136] The above is the entire optimization process of the INFO algorithm. The RESNET-INFORELM algorithm proposed in this paper combines the optimization process of the INFO algorithm and optimizes some parameters of RELM, such as input weights and hidden layer biases, thereby improving the classification performance of the algorithm.
[0137] Next, we will elaborate on the training process of the INFORELM model.
[0138] When dealing with image classification problems, the randomly generated input weights and hidden layer biases of ELM have a great influence on its classification performance, which will lead to problems such as overfitting and local optimal solutions. In order to solve the above problems, we first introduced a regularization coefficient to ELM. After introducing the regularization coefficient, we solved the output weights of ELM, which can better control the complexity of the model and prevent problems such as overfitting. Then, we used the INFO optimization algorithm to optimize the input weights, hidden layer biases and regularization coefficients of RELM through the connection between the segmented rearrangement of individual positions in the population and the parameters of RELM, thereby improving the classification performance of RELM. Finally, the ResNet101 feature extractor is combined with the optimized RELM to obtain the RESNET-INFORELM clothing image classification algorithm proposed in this invention. The detailed flow chart of the RESNET-INFORELM algorithm is shown below. Figure 6 shown.
[0139] This step specifically explains the INFO optimization algorithm and the optimal parameter acquisition of RELM, as well as the specific optimization training process.
[0140] (4.1) INFO algorithm optimizes RELM classifier
[0141] The INFO algorithm is used to optimize the input weights, hidden layer biases, and regularization coefficients of the RELM, thereby selecting appropriate parameters for these three parameters and improving the classification performance of the RELM classifier. The optimization process begins by randomly generating an initial population. The INFO algorithm's optimization mechanism is then used to locate the positions of individuals within the population. The positions of the individuals within the population are then segmented and rearranged. Based on the relationship between the individual positions and the parameters, the input weights, hidden layer biases, and regularization coefficients of the RELM are obtained. These parameters are then updated into the RELM, and the classification error is calculated. This error is considered the fitness of the individual within the population. If the fitness of the individual currently obtained is less than the optimal solution during the iteration, the optimal solution is updated. Otherwise, the next iteration is continued until the maximum number of iterations is reached, at which point the optimal solution individual position is returned. The optimal solution individual position returned by the INFO optimization algorithm is segmented and rearranged to obtain the input weights, hidden layer biases, and regularization coefficients of the RELM. At the same time, the training set features extracted in the first part are used to train RELM and calculate the output weight β to obtain the trained INFORELM.
[0142] (4.1.1) Obtaining the optimal parameters of the INFO algorithm
[0143] The performance of the INFO optimization algorithm in finding the optimal solution is primarily dependent on two parameters: the initial population size and the maximum number of iterations. Therefore, we experimented with these two parameters together. The initial population size was set in the range [5, 50], and the maximum number of iterations was set in the range [10, 100]. The experimental results are shown in Tables 1 and 2.
[0144] Table 1 Classification results of various population size algorithms when the maximum number of iterations is in the interval [10-50]
[0145]
[0146] Table 2 Classification results of various population size algorithms when the maximum number of iterations is in the interval [60-100]
[0147]
[0148] The experimental data in the two tables show that when the maximum number of iterations is in the range [10, 50], the algorithm's classification performance improves with increasing iterations, indicating that the optimization algorithm has not yet converged within this range. However, when the maximum number of iterations is in the range [60, 100], the algorithm's performance initially improves and then declines with increasing iterations. At a maximum number of iterations of 70, the algorithm reaches a turning point, with optimal classification performance. This indicates that the algorithm has converged at a maximum number of iterations of 70, and further iterations will only increase the computational load and degrade classification performance. Furthermore, at a maximum number of iterations of 70, the algorithm with a population size of 25 achieves the best classification performance. The optimal parameters for the INFO algorithm are obtained: a population size of 25 and a maximum number of iterations of 70. Therefore, in the subsequent experiments in this chapter, we will set the population size to 25 and the maximum number of iterations to 70.
[0149] (4.1.2) Obtain the optimal activation function and hidden layer nodes of the RELM model
[0150] (4.1.2.1) Obtaining the optimal activation function for the RELM model
[0151] First, the experiment studied the impact of different RELM activation functions on the classification performance of the algorithm. This chapter uses five commonly used activation functions to conduct experiments. Each activation function is tested 10 times. The experimental results are compared using the average value of their respective classification accuracy. The experimental results are shown in Table 3.
[0152] Table 3 Classification results of RESNET-INFORELM algorithm under different activation functions
[0153]
[0154] It is clear from the results in the table that when the activation function is Sigmoid, the algorithm has the best classification effect, its classification accuracy is relatively stable, and the average classification accuracy is the highest. When the activation functions are Radbas, Sine, and Tribas, the classification accuracy fluctuates greatly between 10% and 90%, indicating that the algorithm is very unstable at this time, and the average classification accuracy is significantly lower than that of Sigmoid. When the activation function is Hardlim, the classification accuracy of the algorithm fluctuates slightly, but its average classification accuracy is still lower than that of Sigmoid. Therefore, the best activation function for the RELM model is the Sigmoid function. The present invention selects Sigmoid as the activation function of RELM for subsequent experiments.
[0155] (4.1.2.1) Obtain the best hidden layer node of the RELM model
[0156] RELM is a single-hidden-layer feedforward neural network. The number of hidden layer nodes significantly influences its classification performance. If the number of nodes is too small, the algorithm's classification performance may not be optimal. Conversely, if the number of nodes is too large, the computational effort increases and may lead to overfitting. This chapter uses 10 sets of RELM experiments with varying numbers of hidden layer nodes, ranging from 10 to 100. Each set differs by 10 hidden layer nodes, and 10 experiments are performed for each set. The experimental results are shown in Tables 4 and 5.
[0157] Table 4 Classification results of the algorithm when the hidden layer nodes are [10-50]
[0158]
[0159] Table 5 Classification results of the algorithm when the number of hidden layer nodes is [60-100]
[0160]
[0161] The experimental data in the two tables show that when the number of hidden layer nodes is in the range of [10, 50], the algorithm's classification performance improves as the number of nodes increases, indicating that the algorithm has not yet reached optimal performance within this range. When the number of hidden layer nodes is in the range of [60, 100], the algorithm's performance initially improves with increasing nodes, then peaks and then begins to decline. The peak is reached at 80 nodes, and classification performance is optimal. This indicates that the algorithm will overfit when the number of hidden layer nodes exceeds 80 and continues to increase. Therefore, the optimal hidden layer node value for RELM is 80, and this setting will be used in subsequent experiments.
[0162] (4.1.3) Specific algorithm settings
[0163] After a lot of preliminary experimental preparation, we finally set the parameters of the algorithm.
[0164] Table 6 Specific parameter settings of the algorithm
[0165]
[0166] (4.2) Obtain the weight coefficients and other parameters of the INFORELM model
[0167] The purpose of this step is to obtain the weight coefficients of the INFORELM model, namely the input weight and output weight, as well as other parameters including hidden layer bias and regularization coefficient. Figure 12This figure shows how the INFO algorithm processes the individual positions in a randomly initialized population to optimize the parameters of the RELM. Where m and n are the number of nodes in the input and hidden layers of the RELM, W and B are the input weights and hidden layer biases of the RELM, C is the regularization coefficient of the RELM, and β is the output weight of the RELM. Figure 12 As can be seen in the INFO optimization algorithm, the position of each individual in the population is a row vector of dimension m×(n+1)+1. The first m×n individuals represent the RELM input weights and can be rearranged into an m×n matrix as the RELM input weights. The next m individuals represent the RELM hidden layer biases and can be rearranged into an m×1 column vector as the RELM hidden layer biases. The last individual is the RELM regularization coefficient, which is set to the interval (0,1) using Abs(C). Through the above series of operations on the individual positions, the INFORELM input weights, hidden layer biases, and regularization coefficients can be calculated, and the INFORELM output weights β can be further obtained, thus obtaining the trained INFORELM model.
[0168] Step 5: Output clothing classification results
[0169] After obtaining the trained INFORELM model in the previous step, the extracted test set features are then calculated using INFORELM's input and output weights to obtain the clothing image classification results. The images are then electronically annotated, with the annotation information displayed directly on the image, allowing users to clearly identify the true category of the clothing.
[0170] Then a comparative analysis of algorithm performance is conducted.
[0171] 1. Algorithm performance evaluation indicators
[0172] For algorithms for common binary classification problems, we often use these four points to evaluate algorithm performance: accuracy, precision, recall rate, and F1 value.
[0173] To make the proposed algorithm evaluation more convincing, we can add macro-average to the above four points to evaluate the proposed algorithm. Therefore, we finally use the four data points of Accuracy, Macro-P, Macro-R, and Macro-F1 to evaluate the performance of the algorithm. To calculate these four data points, we first give the premise. Assume that x is the total number of categories of clothing images in the dataset. Then we can calculate them using the following formula:
[0174]
[0175]
[0176]
[0177]
[0178] in:
[0179]
[0180]
[0181]
[0182]
[0183] In the above formula, acc x Represents the accuracy of each type of sample being correctly classified as the sample, then the sum of the Accuracy is the accuracy of the algorithm classification. x Represents the accuracy of category x, R x Represents the recall rate of category x, F1-score x represents the F1 value of category x, then Macro-P represents the macro-average precision, Macro-R represents the macro-average recall, and Macro-F1 represents the macro-average F1 value.
[0184] 2. Analysis of experimental results
[0185] In order to better illustrate the improvement of the classification performance of the RESNET-INFORELM algorithm proposed in this invention, we selected the ResNet50, ResNet101 and DenseNet201 networks based on transfer learning and conducted comparative experiments on the test set. Figures 7 to 10 It is the confusion matrix corresponding to each algorithm model on the test set.
[0186] Then, the results of the confusion matrix are used to calculate the evaluation index of the algorithm proposed in this paper according to the following formula. The results are shown in Table 7.
[0187]
[0188]
[0189] Table 7 Evaluation indicators of each algorithm on the Fashion-Mnist test set in the comparative experiment
[0190]
[0191] From the experimental data in the table, it can be found that the bold data are each evaluation index of the RESNET-INFORELM algorithm. Each index is higher than that of other algorithms. This fully proves that the RESNET-INFORELM algorithm proposed in this chapter has excellent clothing image classification performance.
[0192] 3. Stability Analysis of the Algorithm
[0193] To verify the stability of the RESNET-INFORELM algorithm, we conducted a comparative experimental analysis with ResNet50, ResNet101, DenseNet201, ResNet50-RELM, ResNet101-RELM, and DenseNet201-RELM algorithms. In the experiment, each algorithm was run ten times, and a box plot was drawn based on the experimental results, as shown in the figure below. Figure 11 As shown in the figure, a higher solid line representing the median indicates better classification accuracy, while a smaller distance between the upper and lower quartiles indicates a more concentrated distribution of classification accuracy, meaning more stable classification performance. The figure shows that the ResNet50, ResNet101, and DenseNet201 algorithms, which do not use the RELM classifier as a replacement, have poor classification performance. Furthermore, the ResNet50-RELM, ResNet101-RELM, and DenseNet201-RELM algorithms, which do not use the optimization algorithm, have poor stability. This is primarily because their randomly generated parameters are not optimized, and the randomness of the parameters severely impacts the stability of the algorithms. In contrast, the RESNET-INFORELM algorithm uses an optimization algorithm to optimize the RELM parameters, resulting in more stable classification performance.
[0194] 4. Analysis of the effectiveness and generalization of the algorithm
[0195] Due to the limited datasets used in this chapter—Fashion-Mnist and ACWS—the validation of effectiveness and generalization may not be comprehensive. However, it can still be compared with other different algorithm models on the test set. We conducted comparative experiments on the RESNET-INFORELM algorithm with the GLCM-RELM, LBP-HOG-SVM, and INCEPTIONV3-SRC algorithm models on the test set provided in the experiment, and obtained the evaluation metrics of the four algorithms as experimental results. The experimental results are shown in Table 8.
[0196] Table 8 Evaluation indicators of different algorithm models on the Fashion-Mnist test set
[0197]
[0198] From the experimental results, it can be seen that compared with the RESNET-INFORELM algorithm proposed in this chapter, the performance of the other three algorithms on the test set is not very good, which proves the effectiveness and good generalization ability of the RESNET-INFORELM algorithm.
Claims
1. A method for electronic labeling of clothing image categories based on regularized extreme learning machine, characterized in that: The following steps are involved: Step 1: Obtain an image dataset, which includes clothing images of several categories. The length and width of the images are all set to a uniform size, regularized, mapped to a normal distribution function, and then converted into a matrix for input into the ResNet101 model. Step 2: Get the ResNet101 feature extraction network based on transfer learning Construct a network model ResNet101 and use the ImageNet dataset for pre-training to obtain the initial network model ResNet101 and the weight parameters of the initial network model ResNet101. Performing transfer learning on the initial network model ResNet101, and then fine-tuning the network parameters of the initial network model ResNet101 to obtain a ResNet101 feature extraction network; Step 3: Use the ResNet101 feature extraction network to extract image features Divide the data set obtained in step 1 into a training set and a test set, input the data in the training set into the ResNet101 feature extraction network obtained in step 2 to obtain clothing image features; Step 4: Optimize the RELM classifier using the INFO algorithm (4.1) Obtaining parameters of the INFO algorithm, obtaining the activation function and hidden layer nodes of the RELM classifier, wherein the INFO algorithm parameters include the initial population size and the maximum number of iterations; (4.2) Constructing an optimized RELM classifier model INFORELM of the INFO algorithm, using the clothing image features obtained in step 3 and the INFO algorithm to calculate the input weights, hidden layer biases and regularization coefficients of the INFORELM model, and the output weight β of the INFORELM model, thereby obtaining the optimized INFORELM model; Step 5: Obtain the image to be processed, process it using the optimized INFORELM model, and output the electronic annotation of the image.
2. The method for electronically labeling clothing image categories based on a regularized extreme learning machine according to claim 1, wherein: In step 1, the image is from the Fashion-Mnist dataset, and the several categories include the following 10 categories: Ankle Boot, Bag, Coat, Dress, Pullover, Sandal, Shirt, Sneaker, Trouser, T-Shirt.
3. The method for electronically labeling clothing image categories based on a regularized extreme learning machine according to claim 1, wherein: In step 4, obtaining the INFO algorithm parameters includes the following steps: The initial population size is set to 5, 10, 15, 20, 25, 30, 35, 40, 45, and 50, and the maximum number of iterations is set to 10, 20, 30, 40, 50, 70, 80, 90, and 100. Different combinations of initial population sizes and maximum number of iterations are tested, and the classification performance of the INFO algorithm under different combinations is tested. The combination with the best classification performance is selected as the INFO algorithm parameters.
4. The method for electronically labeling clothing image categories based on a regularized extreme learning machine according to claim 3, wherein: The INFO algorithm parameters are as follows: initial population size 25, maximum number of iterations 70.
5. The method for electronically labeling clothing image categories based on a regularized extreme learning machine according to claim 4, wherein: In the step 4, The activation function of the RELM classifier is Sigmoid; the number of nodes in the hidden layer is 80.
Citation Information
Patent Citations
Text sentiment analysis method for optimizing regularization extreme learning machine based on particle swarm optimization
CN114880465A
Bearing residual life prediction method based on INFO
CN115659793A