An incremental learning method and electronic equipment for edge scene image recognition
By introducing width learning and Gram matrix feature fusion in edge scenarios, and combining the Woodbury inverse expansion and Cholesky decomposition to optimize the inverse calculation, the problem of limited resources for deep incremental learning in edge scenarios is solved, efficient new class feature recognition and model updating are achieved, and the performance of the image recognition system is improved.
Patent Information
- Application Number
- CN202510204353.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-02-24
AI Technical Summary
Due to limited memory and computing resources in edge scenarios, existing deep incremental learning methods cannot effectively achieve real-time recognition and model updates of new types of images, resulting in limited performance of image recognition systems in edge scenarios.
The random mapping module of width learning is used to upgrade the feature dimension of the input samples, and the new and old class samples are judged through the Gram matrix. The inversion calculation is optimized by using the Gram matrix feature fusion and Woodbury inverse expansion, and the model weights are fine-tuned in combination with Cholesky decomposition to achieve lightweight class incremental learning.
It improves image recognition performance in edge scenarios, reduces computation and memory consumption, and enables fast and accurate new class feature learning and model updates.
Smart Images

Figure CN120125968B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition, and in particular to a quasi-incremental learning method and electronic device for edge scene image recognition. Background Art
[0002] With the rapid development of information technology and the widespread adoption of the Internet of Things (IoT), image recognition applications in edge scenarios are becoming a key driver of intelligent upgrades. "Edge scenarios" generally refer to scenarios or applications occurring at the "edge" of a network architecture. "Edge" here refers to the edge of the network, close to the data source or end user, rather than a centralized cloud server. In such scenarios, data processing and analysis are performed as close as possible to where the data is generated, reducing data transmission latency and alleviating the burden on central servers. Research combining image recognition technology with edge scenarios will not only help improve the speed and efficiency of image processing but also provide technical support for various development strategies, such as intelligent surveillance, intelligent manufacturing, and smart cities.
[0003] Image recognition systems are gradually expanding into more complex and diverse application scenarios, and the data challenges they face are also increasing. In edge scenarios, facing the constant emergence of new objects, image recognition systems must possess robust real-time analysis and adaptability. This requires not only that the system rapidly capture and analyze the features of new objects, but also that it accurately learn and recognize new images while retaining the ability to recognize previous ones. However, most traditional image recognition models rely on acquiring all training data at once during training. This means that during the initial training phase, the system may not cover all potential image recognition content. This significantly limits the practical application of image recognition technology, especially in edge scenarios, where data streams often contain a large number of new image classes. Today, with the deployment of advanced sensor networks, we can collect vast amounts of image data at the edge. How to efficiently utilize this data for rapid recognition and accurate judgment, while continuously learning new image features, remains a core challenge in the field of image recognition in edge scenarios. Therefore, researching the ability to recognize new image classes in edge scenarios is crucial for improving the system's environmental adaptability. Introducing incremental learning techniques in image recognition to enable real-time learning and model updates of new class features is crucial for improving image recognition performance in edge computing environments.
[0004] Currently, mainstream incremental learning approaches utilize: 1) regularization, which aims to prevent key parameters from being biased when training on new samples, while also promoting adaptation to new data during training. 2) sample replay, which aims to enable the model to review some old data while training on new data. 3) dynamic network structure adaptation, which focuses on dynamically expanding the network structure to adapt to new data types. While these algorithms have demonstrated promising results, they are all based on deep neural networks, which presents a challenge: deep-based incremental learning processes consume significant time and memory resources. As mentioned earlier, edge scenarios occur at the edge of the network, close to data sources or end users, rather than centralized cloud servers. Therefore, these deep incremental learning techniques are not suitable for image recognition tasks in edge scenarios. Edge devices have limited memory and computational speed, often unable to bear the high memory and computational overhead of deep incremental learning methods. Therefore, a low-cost, low-memory incremental learning method and electronic device for image recognition in edge scenarios are needed. Summary of the Invention
[0005] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the purpose of the present invention is to provide a quasi-incremental learning method, electronic device and storage medium for edge scene image recognition based on width learning.
[0006] The first technical solution adopted by the present invention is:
[0007] A quasi-incremental learning method for edge scene image recognition, comprising the following steps:
[0008] By collecting real-time data collected by sensors in edge scenarios as input samples;
[0009] The random mapping module of width learning is used to increase the dimension of the input sample and map the features to a higher-dimensional feature representation to filter out irrelevant feature information in the sample and expand the expressive power of useful feature information.
[0010] According to the Gram matrix, the input sample is judged to belong to the new class sample or the old class sample. If it is a new class sample, the sample label is amplified;
[0011] Perform feature fusion on the Gram matrix of the new class sample and the Gram matrix of the previous sample;
[0012] The Gram matrix after feature fusion is used to fine-tune the output layer weights of the width learning model to obtain an edge scene image recognition model after incremental learning.
[0013] Furthermore, the random mapping module using width learning performs feature dimension increase on the input sample, including:
[0014] The input sample is randomly mapped through width learning, and the mapping result is stored in the feature node;
[0015] Through random mapping, feature nodes are mapped to enhanced nodes.
[0016] Furthermore, the random mapping process of input sample X to feature node Z is as follows:
[0017]
[0018] Where Z i is the i-th group of feature nodes, represents the activation function of the i-th group of feature nodes, W ei is the random mapping weight of the i-th group of feature nodes, β ei is the weight bias of the i-th group of feature nodes;
[0019] The mapping process of the enhanced node is as follows:
[0020] H j =ξ j (Z n W hj +β hj )
[0021] Where, ξ j represents the activation function of the j-th enhancement node, W hj is the random mapping weight of the j-th group of enhanced nodes, β hj is the weight bias of the jth group of enhanced nodes, Z n is the n groups of feature node information obtained in the feature node random mapping stage; the feature matrix A of the input sample formed by the combination of the final feature node and the enhanced node is [Z n ,H n ].
[0022] Furthermore, the Gram matrix is used to determine whether the input sample belongs to a new class sample or an old class sample. If it is a new class sample, the sample label is amplified, including:
[0023] Pre-store the Gram matrix of each previously known type Used to represent the characteristic identifier of this type;
[0024] Obtain the Gram matrix of the input sample, and calculate the angle between the Gram matrix of the input sample and the pre-stored Gram matrix;
[0025] If the angle is greater than the preset threshold, the input sample is judged to be a new class sample; otherwise, the input sample is judged to be an old class sample;
[0026] If the input sample is determined to be a new class sample, the sample label is amplified.
[0027] Furthermore, the angle τ k The calculation formula is as follows:
[0028]
[0029] Where, is the Gram matrix of the input sample;
[0030] The expression for amplifying the sample labels is:
[0031]
[0032] Where Y n-1 Represents the label matrix before seeing the new class sample, M n It is a matrix used to measure the similarity between new class samples and old class samples, L n is the new class label information amplification matrix; m represents the sample size of this class increment task, and n represents the total number of categories.
[0033] Furthermore, the expression of the feature fusion is:
[0034]
[0035] Where, β n-1 is the Gram matrix of the previous stage; A n Represents the features of the new class sample after random mapping through width learning, T is the transpose; λ is a hyperparameter, I is the unit matrix, A i is the sample data of the i-th batch, and n is the incremental task of the n-th stage.
[0036] Furthermore, the use of the Gram matrix after feature fusion to fine-tune the output layer weights of the width learning model includes:
[0037] The formula for calculating the output layer weight of the width learning model is:
[0038]
[0039] Where, β n is the Gram matrix, Y is the training sample label matrix, and A represents the sample feature matrix after random mapping of the sample through width learning;
[0040] Perform Woodbury optimization on the Gram matrix inversion;
[0041] The Cholesky factor is obtained by optimizing the inverse expansion result using Cholesky decomposition;
[0042] Update the output layer weights of the width learning model according to the obtained Cholesky factor.
[0043] Furthermore, the Woodbury optimization of the Gram matrix inversion includes:
[0044] The β of the output layer weight calculation process n Split into Using the Woodbury expansion to optimize it, we get the following expansion:
[0045]
[0046] Where, is the inverse Gram matrix obtained in the previous stage, directly converting the Save the results to renew;
[0047] The Cholesky decomposition optimization is used to inversely expand the result to obtain the Cholesky factor, including:
[0048] Introducing Cholesky decomposition, Decompose into the lower triangular matrix P n-1 , through Q n =A n P n-1 Implementation using the lower triangular matrix P n-1 The new class feature learning is introduced into formula (1) to obtain:
[0049]
[0050] For formula (2) Perform another Cholesky decomposition to obtain the lower triangular matrix G n-1 , and further obtain:
[0051]
[0052] Among them, P n-1 , G n-1 All passed and A n Obtain.
[0053] Furthermore, the output layer weights are updated using one of the following two algorithms:
[0054] Algorithm 1:
[0055] Algorithm 2:
[0056] Among them, W n Represents the weight parameter matrix of the model after the nth incremental task is completed; M n It is a matrix used to measure the similarity between new class samples and old class samples, L nis the new class label information amplification matrix;
[0057] Select different algorithms based on the sample size and feature complexity of the input model to achieve faster and more accurate incremental learning of model classes.
[0058] The second technical solution adopted by the present invention is:
[0059] An electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a quasi-incremental learning method for edge scene image recognition as described above.
[0060] The third technical solution adopted by the present invention is:
[0061] A computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement a quasi-incremental learning method for edge scene image recognition as described above.
[0062] The fourth technical solution adopted by the present invention is:
[0063] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned incremental learning method for edge scene image recognition.
[0064] The beneficial effects of the present invention are as follows: the present invention realizes the feature fusion of new and old class samples after width mapping by introducing Gram matrix operations. In addition, considering the complexity and real-time issues of data flow, the Woodbury inversion expansion is introduced to optimize the Gram matrix inversion calculation. At the same time, in view of the instability of the model class incremental process in the data flow, it is proposed that the inversion process can be replaced by Cholesky decomposition. It can make the model calculation faster and more accurate and the model memory consumption is smaller, which can greatly improve the incremental learning performance of the model class and greatly promote the technical development and practical implementation in the field of edge scene image recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following introduces the drawings of the related technical solutions in the embodiments of the present application or the prior art. It should be understood that the drawings in the following introduction are only for the convenience of describing part of the embodiments of the technical solutions of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the premise.
[0066] Figure 1 is a width learning framework diagram;
[0067] Figure 2 is a schematic diagram of the width learning model architecture and the details of weight parameter fine-tuning in the embodiments of the present application;
[0068] Figure 3 is a step flowchart of a kind of class incremental learning method for edge scene image recognition in the embodiments of the present application. DETAILED DESCRIPTION
[0069] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present application, and cannot be understood as a limitation of the present application. For the step numbers in the following embodiments, they are only set for the convenience of description and explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0070] In the description of the present application, it should be understood that the orientation description, such as the orientation or position relationship indicated by up, down, front, back, left, right, etc. is based on the orientation or position relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element indicated must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.
[0071] In the description of the present application, the meaning of several is one or more, the meaning of multiple is more than two, greater than, less than, more than, etc. are understood as not including the number, above, below, etc. are understood as including the number. If the first, second is described, it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the order of indicated technical features.
[0072] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0073] Technical explanation:
[0074] (1) Width Learning System
[0075] like Figure 1 As shown, Figure 1 This is a diagram of the width learning framework. In this model, the input data is randomly mapped through BLS and the results are stored in the feature nodes. Subsequently, the feature nodes are mapped to the enhancement nodes through random mapping again. Finally, all feature nodes and enhancement nodes are combined into a single-layer network model, and the output weights are determined by ridge regression. Specifically, given a batch of training samples And the corresponding training sample label matrix N represents the number of training samples, M represents the number of features of each sample, and C is the number of categories. The random mapping process of sample data X to feature node Z is as follows:
[0076]
[0077] in represents the activation function of the i-th group of feature nodes, W ei is the random mapping weight of the i-th group of feature nodes, β ei is the weight bias of the i-th group of feature nodes. Similarly, the mapping process of the enhanced nodes is as follows:
[0078]
[0079] Among them, ξ j represents the activation function of the i-th enhancement node, W hj is the random mapping weight of the j-th group of enhanced nodes, β hj is the weight bias of the jth group of enhanced nodes. Finally, the single-layer network structure A formed by the feature nodes and enhanced nodes is A=[Z n ,H n Therefore, the BLS model can be finally designed as the following optimization problem:
[0080]
[0081] Where W is the output layer weight that the model needs to calculate, and λ is a hyperparameter. According to the above optimization problem, the final output layer weight of the BLS model can be calculated by the following formula:
[0082] W=(λI+A T A) -1 AT Y (3)
[0083] Where I is an identity matrix. The above is the basic working principle of the width learning system.
[0084] (2) Woodbury Matrix Identity
[0085] The Woodbury inverse expansion is an important identity for calculating the inverse of a matrix. It is of great significance in linear algebra and numerical computing. The Woodbury inverse expansion is widely used in inverse matrix updates, matrix approximations, pseudo-inverses of semi-positive matrices, and various algorithms to ensure numerical stability and accuracy. Specifically, the calculation form of the Woodbury inverse expansion is as follows:
[0086] (A+UCV) -1 =A -1 -A -1 U(C -1 +VA -1 U) -1 VA -1 (4)
[0087] in In some matrix inversion operations, when it is necessary to calculate (A+UCV) -1 And A has been calculated -1 This identity is very useful when, for example, in the least squares method, we only need to find (C -1 +VA -1 U) -1 , when the matrix dimension of C is much smaller than that of A, the calculation result is better than directly calculating (A+UCV) -1 More efficient. It also avoids the inversion of larger matrices, which can further improve the accuracy of the results. At the same time, the Woodbury inverse expansion can be further optimized to the following formula:
[0088] (A+UCV) -1 =A -1 -A -1 U(I+CVA -1 U) -1 CVA -1 (5)
[0089] This form of the inverse expansion is more stable.
[0090] (3) Cholesky decomposition and Gram Matrix A
[0091] In linear algebra, the Cholesky decomposition is the decomposition of a Hermitian positive definite matrix into the product of a lower triangular matrix and its conjugate transpose, which is useful for efficient numerical solutions. The specific form is as follows:
[0092] A=LL T
[0093] in is a positive semidefinite matrix, is a lower triangular matrix. Cholesky decomposition is widely used in matrix inversion, least squares estimation, and numerical computation. It not only improves computational efficiency but also provides a concise and stable approach to solving practical problems.
[0094] In linear algebra, a Gram matrix is a set of vectors <v1,v2,…,v n >The inner product result of the Gram matrix is the inner product G i,j <v i ,v j > is given. The specific representation is as follows:
[0095]
[0096] The Gram matrix, also known as the style transfer matrix, is used to quantify the mutual influence between vectors. This concept has been widely used in the field of deep learning to measure the degree to which sample features influence each other.
[0097] Example 1
[0098] See also Figure 2 and Figure 3 This embodiment provides a quasi-incremental learning method for edge scene image recognition, which specifically includes the following steps:
[0099] S1. Collect real-time data collected by edge scene sensors as input samples; preferably, the real-time data here includes image information of new objects and numerical information of new objects.
[0100] S2. The input sample is upgraded through the random mapping module of width learning, mapping the features to a higher-dimensional feature representation to filter out irrelevant feature information in the sample and expand the expressive power of useful feature information.
[0101] S3. Determine whether the input sample belongs to a new class sample or an old class sample based on the Gram matrix. If it is a new class sample, amplify the sample label.
[0102] S4, feature fusion of the Gram matrix of the new class sample and the Gram matrix of the previous sample;
[0103] S5. Use the Gram matrix after feature fusion to fine-tune the output layer weights of the width learning model to obtain an edge scene image recognition model after incremental learning.
[0104] This embodiment first uses a random mapping module with width learning to perform feature dimensionality upgrade on real-time data collected during edge scene image recognition. Different label matrix augmentation strategies are then implemented based on whether the input sample is a new or old class sample. Next, the Gramian matrix of the new class sample is fused with the Gramian matrix of the old sample. This fused Gramian matrix can then be used to fine-tune the output layer weights.
[0105] The above method is explained in detail below in conjunction with specific implementation methods.
[0106] (1) Feature mapping of input samples
[0107] In the process of edge scene image recognition, relying on advanced sensor arrays, it is possible to obtain in real time the tabular numerical information or specific pictures of new types of target objects appearing in the detection data stream, and the information collected by these sensors can be input into the system as input samples. As an optional implementation method, a public data set (such as CIFAR, ImageNet, KEE, etc.) is used to experiment with the performance of the system. Then, this embodiment first uses a random feature mapping module (Formula (1), Formula (2)) for width learning to perform feature dimension upgrade on the input sample. After nonlinear transformation, the feature is mapped to a higher-dimensional feature representation. The nonlinear mapping can filter out irrelevant feature information in the sample and expand the expression ability of useful feature information, which is helpful for subsequent more accurate feature fusion and helps the model obtain better recognition capabilities.
[0108] (2) Sample label information learning
[0109] After feature dimensionality upgrade, it is necessary to confirm whether the input sample information belongs to the new class or the old class. The system will pre-store the Gram matrix of each previously known class. Use it to represent the feature identifier of this class. The Gram matrix of the input sample The angle between the feature space and the Gram matrix of the old class is measured. If the spatial angle exceeds a threshold, it is determined to be a new class. The measurement indicators are as follows:
[0110]
[0111] If it is determined to be a new class, the sample label needs to be expanded. The formula is as follows:
[0112]
[0113] where Y n-1Represents the label matrix before seeing the new class sample, M n It is a matrix used to measure the similarity between new class samples and old class samples. Specifically L n is the new class label information amplification matrix, specifically Among them, m represents the sample size of this class increment, and n represents the total number of categories.
[0114] Visual explanation of sample label information learning Figure 2 As shown in the figure, by constructing a new class label matrix, the original label space is expanded, and then a new column of nodes is added to the output layer, and the mapping relationship between the new class label and the new class sample features is learned by fine-tuning the parameters.
[0115] (3) Feature fusion of new class samples
[0116] Each batch of samples entering the training has a corresponding Gram information matrix. The embodiment of the present invention maintains a global Gram matrix β n To achieve the fusion of new class sample features and old class sample features. The specific feature fusion process is as follows:
[0117]
[0118] where β n-1 is the Gram matrix of the previous stage, which contains all the sample feature information of the previous model training, A n Represents the characteristics of the new class sample, through We get the Gram matrix of the new class sample, that is, the feature relationship in the new class sample, λ is the hyperparameter, and I is the identity matrix. n-1 and Matrix addition implements feature fusion of new and old class samples.
[0119] (4) Woodbury optimization of the Gram matrix inversion
[0120] Because the output layer weight update formula W requires the inversion of the Gram matrix, which involves The present invention will calculate the β of the process n Split into Optimizing it with the Woodbury expansion yields the following expansion:
[0121]
[0122] in is the inverse Gram matrix obtained in the previous stage, so we do not need to find You can directly use the last incremental process Save the results to Update to achieve computational acceleration. At the same time, in formula (6), the largest computational cost is still Inverse process, but the inverse scale is changed from the original Became That is, the original matrix inversion computational cost depends on the total number of feature nodes. Now, after the Woodbury inversion expansion, the computational cost depends on the number of training samples in the batch. When the number of samples in each class increment is small and the number of feature nodes is large, formula (6) can achieve significant computational acceleration.
[0123] (5) Using Cholesky decomposition to optimize the inverse expansion results
[0124] In the previous stage the model was saved As a result, the Cholesky decomposition is introduced to Decompose into the lower triangular matrix P n-1 At the same time, through Q n =A n P n-1 Implementation using the lower triangular matrix P n-1 Learning new class features, bringing these into formula (6) yields:
[0125]
[0126] For formula (7) We can perform another Cholesky decomposition to obtain the lower triangular matrix G n-1 . We can further get:
[0127]
[0128] Among them, P n-1 , G n-1 Can pass and A n Obtain.
[0129] (6) Update model weight parameters
[0130] The weight formula based on width is: W=(λI+A T A) -1 A T Y, the Cholesky factor obtained based on step 5 is used to update the model output layer weight. Through formula derivation, this patent can provide two different output layer weight update algorithms.
[0131] Algorithm 1:
[0132] Algorithm 2:
[0133] Choosing different algorithms based on the sample size and feature complexity of the input model can achieve faster and more accurate model-class incremental learning.
[0134] In summary, compared with the prior art, the advantage of the present invention is that it expands the incremental learning capability of width learning. The Gram matrix operation is introduced. The feature information of the new and old class samples is fused. At the same time, taking into account the complexity and real-time problems of the data flow, the Woodbury inversion expansion is introduced to optimize the Gram matrix inversion calculation. At the same time, in view of the instability of the model incremental process in the data flow, it is proposed that the inversion process can be replaced by Cholesky decomposition. The introduction of the above three methods on the width learning architecture can make the model calculation faster and more accurate and the model memory consumption is smaller, which can greatly improve the model incremental learning performance. The lightweight incremental width learning system proposed in the present invention can greatly promote the technical development and practical implementation in the field of edge scene image recognition.
[0135] Example 2
[0136] An embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the following Figure 3 A class-incremental learning method for edge scene image recognition is shown.
[0137] It is understood that the memory may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, etc.; the data storage area may store data created based on the use of the server, etc.
[0138] The processor can include one or more processing cores. The processor connects various parts within the entire server by various interfaces and lines, executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Alternatively, the processor can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor can be integrated with one or several combinations of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes operating systems and application programs; the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor, but can be realized by a single chip.
[0139] Since the electronic device is an electronic device corresponding to the class incremental learning method for edge scene image recognition of the embodiment of the application, and the principle of solving the problem of the electronic device is similar to that of the method, the implementation of the electronic device can be referred to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0140] Embodiment 3
[0141] The embodiment of the application also provides a computer readable storage medium, wherein at least one instruction, at least one program, a code set or an instruction set are stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by a processor to realize a class incremental learning method for edge scene image recognition as shown in Figure 3
[0142] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0143] Since the storage medium is a storage medium corresponding to a quasi-incremental learning method for edge scene image recognition in an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0144] Example 4
[0145] In some possible implementations, various aspects of the method of the embodiments of the present invention may also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps of the incremental learning method for edge scene image recognition according to various exemplary embodiments of the present application described above in this specification. The executable computer program code or "code" for executing each embodiment may be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0146] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0147] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0148] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made based on the essence of the present invention are intended to be covered by the scope of protection of the present invention.
Claims
1. A quasi-incremental learning method for edge scene image recognition, characterized in that: The following steps are involved: Real-time data collected by sensors in edge scenarios is used as input samples; The input samples are upgraded in dimension through the random mapping module of width learning, and the features are mapped to higher-dimensional feature representations. According to the Gram matrix, the input sample is judged to belong to the new class sample or the old class sample. If it is a new class sample, the sample label is amplified; Perform feature fusion on the Gram matrix of the new class sample and the Gram matrix of the previous sample; The Gram matrix after feature fusion is used to fine-tune the output layer weights of the width learning model to obtain an edge scene image recognition model after incremental learning. The method of fine-tuning the output layer weights of the width learning model using the Gram matrix after feature fusion includes: The formula for calculating the output layer weight of the width learning model is: Where, β n is the Gram matrix, Y is the training sample label matrix, and A represents the sample feature matrix after random mapping of the sample through width learning; Perform Woodbury optimization on the Gram matrix inversion; The Cholesky factor is obtained by optimizing the inverse expansion result using Cholesky decomposition; Update the output layer weights of the width learning model according to the obtained Cholesky factor.
2. The incremental learning method for edge scene image recognition according to claim 1, characterized in that: The random mapping module using width learning performs feature dimension increase on the input sample, including: The input sample is randomly mapped through width learning, and the mapping result is stored in the feature node; Through random mapping, feature nodes are mapped to enhanced nodes.
3. The incremental learning method for edge scene image recognition according to claim 2, characterized in that: The random mapping process of input sample X to feature node Z is as follows: Where Z i is the i-th group of feature nodes, represents the activation function of the i-th group of feature nodes, W ei is the random mapping weight of the i-th group of feature nodes, β ei is the weight bias of the i-th group of feature nodes; The mapping process of the enhanced node is as follows: H j =ξ j (Z n W hj +b hj ) Where, ξ j represents the activation function of the j-th enhancement node, W hj is the random mapping weight of the j-th group of enhanced nodes, β hj is the weight bias of the jth group of enhanced nodes, Z n It is the n groups of feature node information obtained in the feature node random mapping stage; The feature matrix A of the input sample formed by the combination of the final feature node and the enhancement node is [Z n ,H n ].
4. The incremental learning method for edge scene image recognition according to claim 1, characterized in that: According to the Gram matrix, the input sample is judged to belong to the new class sample or the old class sample. If it is a new class sample, the sample label is amplified, including: Pre-store the Gram matrix of each previously known type Used to represent the characteristic identifier of this type; Obtain the Gram matrix of the input sample, and calculate the angle between the Gram matrix of the input sample and the pre-stored Gram matrix; If the angle is greater than the preset threshold, the input sample is judged to be a new class sample; otherwise, the input sample is judged to be an old class sample; If the input sample is determined to be a new class sample, the sample label is amplified.
5. The incremental learning method for edge scene image recognition according to claim 4, characterized in that: The angle τ k The calculation formula is as follows: Where, is the Gram matrix of the input sample; The expression for amplifying the sample labels is: Where Y n-1 Represents the label matrix before seeing the new class sample, M n It is a matrix used to measure the similarity between new class samples and old class samples, L n is the new class label information amplification matrix; m represents the sample size of this class increment, and n represents the total number of categories.
6. The incremental learning method for edge scene image recognition according to claim 1, characterized in that: The expression of the feature fusion is: Where, β n-1 is the Gram matrix of the previous stage; A n Represents the features of the new class sample after random mapping through width learning, and T is the transpose; λ is a hyperparameter, I is the identity matrix, and A i is the sample data of the i-th batch, and n is the incremental task of the n-th stage.
7. The incremental learning method for edge scene image recognition according to claim 1, characterized in that: The Woodbury optimization of the Gram matrix inversion includes: The β of the output layer weight calculation process n Split into Using the Woodbury expansion to optimize it, we get the following expansion: Where, is the inverse Gram matrix obtained in the previous stage, directly converting the Save the results to renew; The Cholesky decomposition optimization is used to inversely expand the result to obtain the Cholesky factor, including: Introducing Cholesky decomposition, Decompose into the lower triangular matrix P n-1 , through Q n =A n P n-1 Implementation using the lower triangular matrix P n-1 The new class feature learning is introduced into formula (1) to obtain: For formula (2) Perform another Cholesky decomposition to obtain the lower triangular matrix G n-1 , and further obtain: Among them, P n-1 , G n-1 All passed and A n Obtain.
8. The incremental learning method for edge scene image recognition according to claim 7, characterized in that: The output layer weights are updated using one of the following two algorithms: Algorithm 1: Algorithm 2: Among them, W n Represents the weight parameter matrix of the model after the nth incremental task is completed; M n It is a matrix used to measure the similarity between new class samples and old class samples, L n is the new class label information amplification matrix; Select different algorithms based on the sample size and feature complexity of the input model to achieve faster and more accurate incremental learning of model classes.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Wild bird image data stream online identification method and system fusing deep learning and width learning
CN118887704A
Prepositional phrase attachment over word embedding products
US20180260381A1