Self-learning method and device for image recognition, equipment and storage medium

By decoupling the learning task of the self-learning system into multiple tasks and using a general knowledge model for feature extraction and self-learning training, the problem of poor flexibility in existing self-learning systems is solved, achieving complete decoupling of multiple tasks and improving recognition capabilities.

CN117036865BActive Publication Date: 2026-02-27HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311077668.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-24
Publication Date
2026-02-27
Estimated Expiration
2043-08-24

AI Technical Summary

Technical Problem

Existing self-learning systems cannot determine whether to perform self-learning based on actual conditions, resulting in poor flexibility and the inability to fully decouple multiple tasks, thus affecting system performance.

Method used

By defining the pre-set learning tasks in the self-learning system, decoupling them into multiple learning tasks, acquiring image data and using a general knowledge model for feature extraction, determining whether each learning task meets the self-learning conditions, and controlling the task model that meets the conditions to perform self-learning training, the complete decoupling between multiple tasks is achieved.

Benefits of technology

It enhances the flexibility of the self-learning system, alleviates problems such as data imbalance between tasks, small sample size, and ineffective training, and improves the system's recognition ability and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117036865B_ABST
    Figure CN117036865B_ABST
Patent Text Reader

Abstract

The application discloses a self-learning method and device for image recognition, equipment and a storage medium, and belongs to the technical field of intelligent monitoring. The application determines a pre-set learning task in a self-learning system, decouples the learning task into multiple learning tasks, acquires image data, extracts features of the image data by using a general knowledge model, the image data is composed of local data and live data, judges whether each learning task meets a self-learning condition, controls a task model corresponding to a learning task meeting the self-learning condition to perform self-learning training based on the mentioned feature data, performs image recognition through each task model completing self-learning training, and in the above manner, complete decoupling between multiple tasks is realized, it is judged whether each learning task performs self-learning, the influence caused by data imbalance between tasks, small samples and invalid training is relieved, and the flexibility of the self-learning system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent monitoring, and in particular to an image recognition self-learning method and device, equipment and a storage medium. BACKGROUND

[0002] In an industrial scene, there is a certain unknown nature of field data, such as small samples and highly repetitive samples. The existing self-learning system cannot determine whether to start the self-learning scheme according to the actual situation of the field data. Generally, some specific situations are pre-set according to experience, such as small samples and sample imbalance. The coverage of specific situations is small, and there is a certain limitation. When the data exceeds the pre-set scheme, the system will still start the self-learning scheme, and the performance may be worse after self-learning. At the same time, for multi-task situations, the existing self-learning system cannot completely decouple the tasks. When some tasks meet the requirements or the data volume is small, the model corresponding to the task cannot participate in the training, and finally all the models corresponding to the tasks are updated, resulting in poor flexibility of the entire self-learning system.

[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0004] The main purpose of the present application is to provide an image recognition self-learning method, device, equipment and storage medium, which aims to solve the technical problems that the prior art cannot determine whether to perform self-learning based on the actual situation and cannot completely decouple multi-task, resulting in poor flexibility of the entire self-learning system.

[0005] To achieve the above purpose, the present application provides an image recognition self-learning method, which comprises the following steps:

[0006] Determine the pre-set learning task in the self-learning system, and decouple the learning task into multiple learning tasks;

[0007] Obtain image data, and extract features from the image data using a general model, wherein the image data is composed of local data and field data;

[0008] Determine whether each learning task meets the self-learning condition;

[0009] Control the task model corresponding to the learning task that meets the self-learning condition to perform self-learning training based on the mentioned feature data, and perform image recognition through each task model that completes the self-learning training.

[0010] Optionally, the determination of whether each learning task meets the self-learning condition comprises:

[0011] When the self-learning system meets an update condition, a preset proportion of samples in the trigger samples is selected, and a test set is constructed according to the preset proportion of samples in the trigger samples and preset samples;

[0012] The task model corresponding to each learning task is tested through the test set, and a test result is obtained;

[0013] If the test result does not meet a preset condition, it is determined that the corresponding learning task meets a self-learning condition.

[0014] Optionally, the determining whether each learning task meets a self-learning condition further includes:

[0015] When the self-learning system meets an update condition, a sample quantity of each learning task in the trigger samples is obtained;

[0016] If the sample quantity reaches a sample quantity threshold, it is determined that the corresponding learning task meets a self-learning condition.

[0017] Optionally, the self-learning method of image recognition further includes:

[0018] When a sample quantity of the trigger samples reaches a preset quantity or a duration of the trigger samples reaches a preset duration, it is determined that the self-learning system meets an update condition.

[0019] Optionally, the determining whether each learning task meets a self-learning condition further includes:

[0020] A setting requirement input by a user is obtained;

[0021] A task model that needs to be updated is determined based on the setting requirement;

[0022] It is determined that a learning task corresponding to the task model that needs to be updated meets a self-learning condition.

[0023] Optionally, the determining whether each learning task meets a self-learning condition further includes:

[0024] A similarity between on-site data included in each learning task and a historical data dictionary corresponding to each learning task is calculated;

[0025] If the similarity does not reach a similarity threshold, it is determined that the corresponding learning task meets a self-learning condition.

[0026] Optionally, the self-learning method of image recognition further includes:

[0027] Local data included in each learning task is clustered according to categories to obtain a clustering center, and the clustering center is used as an initial data dictionary;

[0028] The initial data dictionary is stored in a queue according to categories, and a history data dictionary is obtained, and the maximum length of the queue does not exceed a preset length.

[0029] In addition, to achieve the above object, the application further provides a self-learning device for image recognition, which comprises:

[0030] The division module is configured to determine a preset learning task in the self-learning system and decouple the learning task into a plurality of learning tasks.

[0031] The acquisition module is configured to acquire image data and extract features of the image data by using a general model, wherein the image data is composed of local data and field data.

[0032] The judgment module is configured to judge whether each learning task meets a self-learning condition.

[0033] The control module is configured to control a task model corresponding to a learning task meeting the self-learning condition to perform self-learning training based on the mentioned feature data, and perform image recognition by using each task model completing the self-learning training.

[0034] In addition, to achieve the above object, the application further provides a self-learning device for image recognition, which comprises a memory, a processor and a self-learning program for image recognition stored in the memory and running on the processor, wherein the self-learning program for image recognition is configured to implement the self-learning method for image recognition as described above.

[0035] In addition, to achieve the above object, the application further provides a storage medium, wherein the storage medium stores a self-learning program for image recognition, and the self-learning program for image recognition is executed by a processor to implement the self-learning method for image recognition as described above.

[0036] By determining a preset learning task in the self-learning system and decoupling the learning task into a plurality of learning tasks, acquiring image data and extracting features of the image data by using a general model, wherein the image data is composed of local data and field data, judging whether each learning task meets a self-learning condition, and controlling a task model corresponding to a learning task meeting the self-learning condition to perform self-learning training based on the mentioned feature data, and performing image recognition by using each task model completing the self-learning training, the self-learning system is completely decoupled among multiple tasks, it is judged whether each learning task is self-learned, the influence of data imbalance among tasks, small sample and invalid training is alleviated, and the flexibility of the self-learning system is improved. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1The structural schematic diagram of the self-learning device of image recognition of the hardware running environment related to the embodiment scheme of the present application is shown in the figure.

[0038] Figure 2 The flow schematic diagram of the first embodiment of the self-learning method of image recognition of the present application is shown in the figure.

[0039] Figure 3 The overall system framework schematic diagram in the embodiment of the self-learning method of image recognition of the present application is shown in the figure.

[0040] Figure 4 The flow schematic diagram of the second embodiment of the self-learning method of image recognition of the present application is shown in the figure.

[0041] Figure 5 The flow schematic diagram of the third embodiment of the self-learning method of image recognition of the present application is shown in the figure.

[0042] Figure 6 The structural block diagram of the first embodiment of the self-learning device of image recognition of the present application is shown in the figure.

[0043] The implementation, functional features and advantages of the present application will be further explained with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

[0045] Reference Figure 1 , Figure 1 The structural schematic diagram of the self-learning device of image recognition of the hardware running environment related to the embodiment scheme of the present application is shown in the figure.

[0046] As Figure 1As shown in the figure, the self-learning device of image recognition can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) memory or a stable non-volatile memory (NVM) such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0047] Those skilled in the art can understand that Figure 1 The structure shown in the figure does not constitute a limitation on the self-learning device of image recognition, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.

[0048] As shown in the figure, the self-learning device of image recognition can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) memory or a stable non-volatile memory (NVM) such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001. Figure 1 As shown in the figure, the self-learning device of image recognition can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) memory or a stable non-volatile memory (NVM) such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0049] In Figure 1 As shown in the figure, the self-learning device of image recognition can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface and a wireless interface. The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) memory or a stable non-volatile memory (NVM) such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0050] The embodiment of the present application provides a self-learning method of image recognition, which refers to Figure 2 , Figure 2 The flowchart of the first embodiment of the self-learning method of image recognition.

[0051] In this embodiment, the self-learning method of image recognition includes the following steps:

[0052] Step S10: Determine the learning task preset in the self-learning system, and decouple the learning task into multiple learning tasks.

[0053] In the embodiment, the execution subject of the embodiment can be the image recognition self-learning device, which has functions of data processing, data communication, program running, etc. The image recognition self-learning device can be image recognition self-learning. Of course, it can also be other devices with similar functions, which are not limited in the embodiment. For ease of illustration, the embodiment is described by taking the image recognition self-learning device as an example.

[0054] It should be noted that in the industrial scene, the field data has certain unknownness, such as small sample, highly repeated sample, etc. The existing self-learning system cannot determine whether to start the self-learning scheme according to the actual situation of the field data. Generally, some specific situations are preset according to experience, such as small sample, sample imbalance. The specific situation has small coverage range and certain limitations. When the data exceeds the preset scheme, the system still starts the self-learning scheme, which may cause the performance to be worse after self-learning. At the same time, for the multi-task situation, the existing self-learning system cannot completely decouple the tasks. When some tasks meet the requirements or the data volume is small, etc., the model corresponding to the task cannot participate in the training, and finally all the models corresponding to the tasks are updated, which leads to poor flexibility of the whole self-learning system.

[0055] In order to solve the above technical problems, in the embodiment, the learning task preset in the self-learning system is determined, and the learning task is decoupled into multiple learning tasks. Image data is obtained, and the image data is extracted by using the general model. The image data is composed of local data and field data. It is judged whether each learning task meets the self-learning condition. The task model corresponding to the learning task meeting the self-learning condition is controlled to perform self-learning training based on the mentioned feature data. The image recognition is performed by each task model completing the self-learning training. Through the above way, the multi-task is completely decoupled, it is judged whether each learning task is self-learning, the influence of task data imbalance, small sample and invalid training is alleviated, the flexibility of the self-learning system is improved, and specifically, it can be realized in the following way.

[0056] In the specific implementation, the overall system architecture of the embodiment is first described by taking Figure 3 as an example. Referring to Figure 3In the embodiment, firstly, local data and field data are input into the system, wherein the local data are features extracted by a fixed general model, and the field data are features extracted by the general model in the system; then each task is judged by a control switch whether to perform self-learning, if the switch is on, the model corresponding to the task is self-learned, otherwise, the task model is kept unchanged. The system mainly comprises a data loading module, a switch control module and a model training module. The data loading module mainly loads local data and field data, wherein the local data have been extracted features by the general model, and the field data are extracted corresponding features by the general model in the self-learning system, wherein the general feature extraction module is fixed and does not participate in the training of the model. The switch control module mainly controls whether the system performs self-learning on the task. The control conditions include but are not limited to: 1, the task meets the performance requirement; 2, the task data is insufficient; 3, user demand; 4, the field data are highly similar to the historical data. If any of the above conditions is met, the switch control module controls that the task does not perform self-learning. In the model training module, each task adopts an ultra-lightweight model, and each task is completely decoupled. When the control switch of a certain task is on, the model corresponding to the task is trained. Specifically: the features extracted by the general model and the labels corresponding to the task are input, the loss is calculated by the network corresponding to the task, and the network parameters are updated according to the loss. The general model is fixed and unchanged, and each task model is updated independently, achieving complete decoupling between each task. Through the above method, a lightweight model is constructed for each task, and the deployment cost and inference time are reduced.

[0057] In a specific implementation, the learning tasks in the self-learning system are pre-set, and the features input into each task model are the same, and the difference lies in that different task models process different recognition tasks. In the embodiment, before self-learning training is performed, the learning tasks determined in the self-learning system need to be determined, and then the learning tasks are decoupled to obtain a plurality of learning tasks.

[0058] Step S20: acquiring image data and extracting features of the image data by using the general model.

[0059] In a specific implementation, after the image data is obtained, in the embodiment, local data and field data contained in the image data are input into the general model, the local data and the field data can be extracted features by the general model, and then the task model is self-learned and trained based on the features extracted from the image data.

[0060] Step S30: judging whether each learning task meets a self-learning condition.

[0061] In a specific implementation, it is required in the embodiment to determine whether each learning task meets the self-learning condition respectively. Since each learning task corresponds to a task model, when the task model can meet the recognition requirement, it is considered that the recognition accuracy of the task model is high, and repeated self-learning training is not required, that is, the task model no longer participates in the training. The self-learning condition in the embodiment can include that the task meets the performance requirement, the task data is insufficient, the user demand, and the on-site data is highly similar to the historical data. Of course, other self-learning conditions can be set according to actual requirements, which are not limited in the embodiment.

[0062] Step S40: Controlling the task model corresponding to the learning task meeting the self-learning condition to perform self-learning training based on the mentioned feature data, and performing image recognition through each task model completing the self-learning training.

[0063] In a specific implementation, each learning task corresponds to a corresponding task model. When the self-learning condition is met, it indicates that the task model corresponding to the learning task cannot meet the recognition requirement, and needs to continue training. Therefore, in the embodiment, the task model corresponding to the learning task meeting the self-learning condition is controlled to perform self-learning training. The task model corresponding to the learning task not meeting the self-learning condition does not need to perform training. After completing the self-learning training, the task model completing the training can be used for subsequent image recognition. For example, when the learning task is the recognition of smoking behavior and the corresponding task model meets the self-learning condition, the task model is controlled to continue training to improve the recognition ability of the task model for the smoking behavior. Before the self-learning training, the task model also has the recognition of the smoking behavior. Since the image data also contains on-site data, the self-learning training based on the image data can improve the recognition ability of the task and better adapt to the actual situation on site.

[0064] In the embodiment, the pre-set learning task in the self-learning system is determined, and the learning task is decoupled into multiple learning tasks. Image data is obtained, and the image data is extracted by using a general model. The image data is composed of local data and on-site data. It is determined whether each learning task meets the self-learning condition. The task model corresponding to the learning task meeting the self-learning condition is controlled to perform self-learning training based on the mentioned feature data. Image recognition is performed through each task model completing the self-learning training. In the above manner, the multiple tasks are completely decoupled, it is determined whether each learning task performs self-learning, the influence of data imbalance between tasks, small sample, and invalid training is alleviated, and the flexibility of the self-learning system is improved.

[0065] Reference Figure 4 , Figure 4A flowchart of a self-learning method for image recognition according to a second embodiment of the present application.

[0066] Based on the first embodiment, in the self-learning method for image recognition, the step S30 specifically comprises:

[0067] Step S301: When the self-learning system meets the update condition, a preset proportion of samples are selected from the trigger samples, and a test set is constructed according to the preset proportion of samples selected from the trigger samples and preset samples.

[0068] In specific implementation, before self-learning, it is necessary to determine whether the self-learning system meets the update condition. When the update condition is met, the trigger sample triggering the update condition can be obtained, and then a preset proportion of samples are selected from the trigger sample, and a test set is constructed according to the selected preset proportion of samples and preset samples. For example, a part (for example, 10%) of samples are randomly selected from the trigger pictures and the collected samples to form the test set, and the collected pictures are labeled, including but not limited to manual labeling, large model generating pseudo-labels, and manual correction based on the large model pseudo-labels. The preset samples can be the collected samples, and the preset proportion of samples selected from the trigger samples is set according to actual needs. This embodiment does not limit this.

[0069] Step S302: Test the task model corresponding to each learning task through the test set to obtain a test result.

[0070] In specific implementation, after the test set is constructed, the test result can be obtained by testing the task model corresponding to each learning task through the test set in this embodiment. For example, the test set is tested by the model in the self-learning system to obtain the test result, and the test result includes the recognition accuracy and the like.

[0071] Step S303: If the test result does not meet the preset condition, it is determined that the corresponding learning task meets the self-learning condition.

[0072] In a specific implementation, if the test result does not meet the preset condition, it is determined that the corresponding learning task meets the self-learning condition. The preset condition can be set as an accuracy threshold, for example, 95%. If the test result does not meet the preset condition, it indicates that the accuracy corresponding to the test result of the learning task does not reach the set threshold (95%), and the control switch corresponding to the task is set to open, that is, the task model needs to be self-learned and updated. On the contrary, if the accuracy reaches the set threshold (95%), the control switch corresponding to the task is set to close, that is, the task model does not need to be self-learned and updated, and at this time, the field data and trigger samples are re-collected. The above condition judgment is a judgment of whether the task meets the performance requirement. Through the above method, the task model corresponding to the learning task that does not meet the performance requirement can be determined and updated.

[0073] Further, in the embodiment, the learning task meeting the self-learning condition can also be determined according to the task data amount. Specifically, it is first determined whether the self-learning system meets the update condition. After the self-learning system meets the update condition, each learning task has a corresponding sample amount in the trigger sample. Then, the obtained sample amount is compared with a sample amount threshold to determine whether the learning task meets the self-learning condition. Specifically, if the sample amount reaches the sample amount threshold, it is determined that the corresponding learning task meets the self-learning condition, that is, after a certain amount of sample amount, subsequent self-learning training can be started. On the contrary, if the sample amount does not reach the sample amount threshold, the task model corresponding to the learning task is not self-learned and trained. Assuming that the sample amount threshold is set to 10, when the sample amount corresponding to the learning task in the trigger sample reaches 10, the task model corresponding to the learning task is self-learned and trained. The above sample amount threshold can be set according to actual training requirements, which is not limited in the embodiment.

[0074] In the embodiment, whether the self-learning system meets the update condition can be determined based on the sample number of the trigger sample or the duration of the trigger sample. Specifically, the sample number of the trigger sample can be compared with a preset number, and the duration of the trigger sample can be compared with a preset duration. If the sample number of the trigger sample reaches the preset number or the duration of the trigger sample reaches the preset duration, it is determined that the self-learning system meets the update condition. Assuming that the preset number is set to 500,000 and the preset duration is set to 7 days, if the sample number of the trigger sample reaches 500,000 or the duration of the trigger sample reaches 7 days, it is determined that the self-learning system meets the update condition. The above preset number and preset duration can also be adjusted according to actual requirements, which is not limited in the embodiment.

[0075] Further, in the embodiment, it can be determined whether the learning task meets the self-learning condition based on the user demand, specifically, the setting demand input by the user can be acquired, the task model that needs to be updated is determined based on the setting demand, and it is determined that the learning task corresponding to the task model that needs to be updated meets the self-learning condition, for example, the user does not need to update the model corresponding to task 1, and the control switch of task 1 is set to off, which does not affect the training of other tasks. The setting demand input by the user can include the label of the learning task, and the corresponding learning task is determined based on the label.

[0076] In the embodiment, when the self-learning system meets the updating condition, a preset proportion of samples in the trigger samples is selected, and a test set is constructed according to the preset proportion of samples in the trigger samples and the preset samples; the task model corresponding to each learning task is tested by using the test set, and a test result is obtained; if the test result does not meet the preset condition, it is determined that the corresponding learning task meets the self-learning condition, or when the self-learning system meets the updating condition, the sample quantity corresponding to each learning task in the trigger samples is acquired; if the sample quantity reaches a sample quantity threshold, it is determined that the corresponding learning task meets the self-learning condition, the setting demand input by the user is acquired; the task model that needs to be updated is determined based on the setting demand; and it is determined that the learning task corresponding to the task model that needs to be updated meets the self-learning condition. In the above manner, accurate self-learning judgment can be performed on each decoupled learning task, and the flexibility of the self-learning system is improved.

[0077] Reference Figure 5 , Figure 5 The flowchart of the third embodiment of the self-learning method for image recognition.

[0078] Based on the first embodiment, in the self-learning method for image recognition, the step S30 further includes:

[0079] Step S304: calculating the similarity between the field data contained in each learning task and the historical data dictionary corresponding to each learning task.

[0080] In specific implementation, in the embodiment, whether each learning task meets the self-learning condition can be determined according to the similarity between the field data and the historical data, specifically, in the embodiment, the similarity between the field data contained in each learning task and the historical data dictionary corresponding to each learning task is calculated first, and the calculation of the similarity can adopt a general similarity calculation method between data, which is not described in the embodiment.

[0081] Step S305: if the similarity does not reach a similarity threshold, it is determined that the corresponding learning task meets the self-learning condition.

[0082] It should be noted that after the similarity between the field data contained in each learning task and the historical data dictionary corresponding to each learning task is obtained, the similarity is compared with a similarity threshold, if the similarity threshold is reached, it is determined that the corresponding learning task does not meet the self-learning condition, that is, the corresponding task model does not need to be trained for self-learning, otherwise if it is not reached, it is determined that the corresponding learning task meets the self-learning condition, that is, the corresponding task model needs to be trained for self-learning. The similarity threshold can be set to 90%, for example, the similarity between the field data and the historical data dictionary is not more than 90%, it is determined that the corresponding learning task meets the self-learning condition, and the above similarity threshold can be adjusted according to actual needs, which is not limited in the embodiment.

[0083] Further, in the embodiment, the construction process of the historical data dictionary can be to cluster the local data contained in each learning task by category to obtain a clustering center, which is the initial data dictionary, and then store the initial data dictionary in the queue by category to obtain the historical data dictionary, the maximum length of the queue does not exceed the preset length, for example, 50,000, of course, it can also be set according to actual needs, which is not limited in the embodiment.

[0084] The embodiment clusters the local data contained in each learning task by category to obtain a clustering center, and the clustering center is used as an initial data dictionary; the initial data dictionary is stored in the queue by category to obtain a historical data dictionary, the maximum length of the queue does not exceed a preset length, the similarity between the field data contained in each learning task and the historical data dictionary corresponding to each learning task is calculated; if the similarity does not reach a similarity threshold, it is determined that the corresponding learning task meets the self-learning condition, and through the above-mentioned manner, the decoupled learning task can be accurately self-learned, and the flexibility of the self-learning system is improved.

[0085] In addition, the embodiment of the application also provides a storage medium, the storage medium stores an image recognition self-learning program, and the image recognition self-learning program realizes the steps of the image recognition self-learning method when executed by a processor.

[0086] Since the storage medium adopts all the technical solutions of the above-mentioned embodiments, it at least has all the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be repeated here.

[0087] Reference Figure 6 , Figure 6 is a structural block diagram of the first embodiment of the image recognition self-learning device of the application.

[0088] As Figure 6 shown, the image recognition self-learning device provided by the embodiment of the application comprises:

[0089] The division module 10 is configured to determine a preset learning task in the self-learning system and decouple the learning task into a plurality of learning tasks.

[0090] The acquisition module 20 is configured to acquire image data, and perform feature extraction on the image data by using a general model, wherein the image data is composed of local data and field data.

[0091] The judgment module 30 is configured to judge whether each learning task meets a self-learning condition.

[0092] The control module 40 is configured to control a task model corresponding to a learning task meeting the self-learning condition to perform self-learning training based on the mentioned feature data, and perform image recognition by using each task model completing the self-learning training.

[0093] In the embodiment, the preset learning task in the self-learning system is determined and decoupled into a plurality of learning tasks, the image data is acquired and the feature extraction is performed on the image data by using a general model, wherein the image data is composed of local data and field data, whether each learning task meets a self-learning condition is judged, and the task model corresponding to the learning task meeting the self-learning condition is controlled to perform self-learning training based on the mentioned feature data, and the image recognition is performed by using each task model completing the self-learning training. In this way, the complete decoupling between the multiple tasks is realized, whether each learning task meets the self-learning is judged, the influence caused by the data imbalance between the tasks, the small sample and the invalid training is relieved, and the flexibility of the self-learning system is improved.

[0094] In an embodiment, the judgment module 30 is further configured to select a preset proportion of samples from the trigger samples when the self-learning system meets an updating condition, and construct a test set according to the preset proportion of samples selected from the trigger samples and preset samples; test the task model corresponding to each learning task by using the test set to obtain a test result; and if the test result does not meet a preset condition, determine that the corresponding learning task meets the self-learning condition.

[0095] In an embodiment, the judgment module 30 is further configured to acquire a sample amount corresponding to each learning task in the trigger samples when the self-learning system meets an updating condition; and if the sample amount reaches a sample amount threshold, determine that the corresponding learning task meets the self-learning condition.

[0096] In an embodiment, the judgment module 30 is further configured to determine that the self-learning system meets an updating condition when a sample quantity of the trigger samples reaches a preset quantity or a continuous time length of the trigger samples reaches a preset time length.

[0097] In an embodiment, the judging module 30 is further configured to acquire a setting requirement input by a user, determine a task model that needs to be updated based on the setting requirement, and determine whether a learning task corresponding to the task model that needs to be updated meets a self-learning condition.

[0098] In an embodiment, the judging module 30 is further configured to calculate a similarity between local data contained in each learning task and a historical data dictionary corresponding to each learning task, and determine that a corresponding learning task meets a self-learning condition if the similarity does not reach a similarity threshold.

[0099] In an embodiment, the self-learning device for image recognition further comprises a constructing module.

[0100] The constructing module is configured to cluster local data contained in each learning task by category to obtain a cluster center, and use the cluster center as an initial data dictionary; and store the initial data dictionary in a queue by category to obtain a historical data dictionary, wherein a maximum length of the queue does not exceed a preset length.

[0101] It should be understood that the above is only for illustration, and does not constitute any limitation on the technical solutions of the present application. In specific applications, a person skilled in the art can set up as needed, and the present application does not limit this.

[0102] It should be noted that the above-described workflow is only illustrative and does not limit the scope of protection of the present application. In actual applications, a person skilled in the art can select part or all of them to achieve the purpose of the present embodiment, which is not limited here.

[0103] In addition, technical details not described in detail in the present embodiment can be referred to the self-learning method for image recognition provided by any embodiment of the present application, which will not be described here.

[0104] In addition, it should be noted that in this document, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or system. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or system that includes the element.

[0105] The above embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0106] Those skilled in the art can clearly understand the method of the above-mentioned embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as a read only memory (ROM) / RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, a computer, a server, or a network device) execute the method described in each embodiment of the present application.

[0107] The above are only preferred embodiments of the present application, and do not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation based on the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.

[0108] It should be understood that, although each step in the flowchart in the embodiments of the present application is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless explicitly stated herein, the execution of these steps has no strict order limitation, and they can be executed in other order. Moreover, at least part of the steps in the figure can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.

Claims

1. A self-learning method for image recognition, characterized in that, The self-learning method for image recognition includes: The learning tasks are pre-defined in the self-learning system and decoupled into multiple learning tasks, wherein each learning task is completely decoupled from the others. Image data is acquired, and features are extracted from the image data using a general knowledge model. The image data consists of local data and on-site data. Determine whether each learning task meets the conditions for self-learning; The task model corresponding to the learning task that meets the self-learning conditions is controlled to perform self-learning training based on the mentioned feature data, and image recognition is performed through each task model that has completed self-learning training. The determination of whether each learning task meets the self-learning conditions also includes: The local data contained in each learning task are clustered by category to obtain cluster centers, and the cluster centers are used as the initial data dictionary; The initial data dictionary is stored into queues according to categories to obtain the historical data dictionary. The maximum length of the queue does not exceed a preset length. Calculate the similarity between the on-site data included in each learning task and the historical data dictionary corresponding to each learning task; If the similarity does not reach the similarity threshold, the corresponding learning task is determined to meet the self-learning condition.

2. The self-learning method for image recognition as described in claim 1, characterized in that, The determination of whether each learning task meets the self-learning conditions includes: When the self-learning system meets the update conditions, a preset proportion of samples are selected from the trigger samples, and a test set is constructed based on the preset proportion of samples selected from the trigger samples and the preset samples. The test set is used to test the task models corresponding to each learning task, and the test results are obtained. If the test results do not meet the preset conditions, the corresponding learning task is determined to meet the self-learning conditions.

3. The self-learning method for image recognition as described in claim 1, characterized in that, The determination of whether each learning task meets the self-learning conditions also includes: When the self-learning system meets the update conditions, the sample size corresponding to each learning task in the trigger sample is obtained; If the sample size reaches the sample size threshold, the corresponding learning task is determined to meet the self-learning condition.

4. The self-learning method for image recognition as described in claim 2 or 3, characterized in that, The self-learning method for image recognition also includes: When the number of trigger samples reaches a preset number or the duration of the trigger samples reaches a preset duration, the self-learning system is determined to meet the update conditions.

5. The self-learning method for image recognition as described in claim 1, characterized in that, The determination of whether each learning task meets the self-learning conditions also includes: Obtain user input regarding settings requirements; Based on the aforementioned configuration requirements, determine the task model that needs to be updated; It is determined that the learning task corresponding to the task model that needs to be updated meets the self-learning condition.

6. A self-learning device for image recognition, characterized in that, The image recognition self-learning device includes: A partitioning module is used to determine the pre-set learning tasks in the self-learning system and decouple the learning tasks into multiple learning tasks, wherein the learning tasks are completely decoupled from each other. An acquisition module is used to acquire image data and extract features from the image data using a general knowledge model. The image data consists of local data and on-site data. The judgment module is used to determine whether each learning task meets the self-learning conditions; The control module is used to control the task model corresponding to the learning task that meets the self-learning conditions to perform self-learning training based on the mentioned feature data, and to perform image recognition through each task model that has completed self-learning training. The judgment module is further configured to cluster the local data contained in each learning task according to categories to obtain cluster centers, and use the cluster centers as initial data dictionaries; store the initial data dictionaries into queues according to categories to obtain historical data dictionaries, wherein the maximum length of the queues does not exceed a preset length; calculate the similarity between the on-site data contained in each learning task and the historical data dictionaries corresponding to each learning task; if the similarity does not reach the similarity threshold, then determine that the corresponding learning task meets the self-learning conditions.

7. A self-learning device for image recognition, characterized in that, The device includes: a memory, a processor, and an image recognition self-learning program stored in the memory and executable on the processor, the image recognition self-learning program being configured to implement the steps of the image recognition self-learning method as described in any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores a self-learning program for image recognition, which, when executed by a processor, implements the steps of the self-learning method for image recognition as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Game-based reinforcement learning method and system, terminal and storage medium

    CN114021737A

  • Autonomous learning method and device, electronic equipment and machine readable storage medium

    CN114444717A