Image classification method and device, electronic equipment and computer readable storage medium
By automating the selection of matching image data from the unlabeled dataset and adding it to the training dataset, the problem of manpower and time consumption in expanding training data is solved, achieving efficient training data expansion and model accuracy improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2021-04-02
- Publication Date
- 2026-05-29
Smart Images

Figure CN113205101B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to image classification methods, apparatus, electronic devices and computer-readable storage media in the fields of deep learning and computer vision. Background Technology
[0002] The size of the training data affects the accuracy of the model; generally speaking, the larger the training data, the higher the model's accuracy. Therefore, it is necessary to expand the training data to increase its size.
[0003] Currently, manual annotation is commonly used to expand training data, but this method requires significant manpower and time costs. Summary of the Invention
[0004] This disclosure provides image classification methods, apparatus, electronic devices, and computer-readable storage media.
[0005] An image classification method, comprising:
[0006] For any training dataset, perform the following first processing:
[0007] M training data points are extracted from the training dataset, where M is a positive integer, and the training data are image data;
[0008] The features of the M training data are extracted using the pre-trained feature extraction model.
[0009] Based on the features of the M training data and the features of each image data in the dataset to be labeled, image data that matches the M training data is selected from the dataset to be labeled;
[0010] The selected image data is added to the training dataset as expanded training data; wherein the training data in the training dataset have the same image classification label, the dataset to be labeled is an image dataset, and the data in the dataset to be labeled is image data.
[0011] The image classification model is trained using the training dataset, and then used to classify the images to be processed.
[0012] An image classification device includes: an acquisition module, a mining module, and a module for training an image classification model;
[0013] The acquisition module is used to acquire the training dataset;
[0014] The mining module is configured to perform the following first processing on the training dataset: extract M training data points from the training dataset, where M is a positive integer, and the training data points are image data; extract features from the M training data points using a pre-trained feature extraction model; based on the features of the M training data points and the features of each image data point in the dataset to be labeled, select image data points from the dataset to be labeled that match the M training data points; add the selected image data points as expanded training data to the training dataset; wherein the training data points in the training dataset have the same image classification label, the dataset to be labeled is an image dataset, and the data in the dataset to be labeled is image data;
[0015] The module for training the image classification model is used to train the image classification model using the training dataset, and the image classification model is used to classify the image to be processed.
[0016] An electronic device, comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described above.
[0020] A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods described above.
[0021] A computer program product includes a computer program that, when executed by a processor, implements the method described above.
[0022] One embodiment disclosed above has the following advantages or beneficial effects: it can automatically classify images based on existing training data and supplement them into the training dataset, thereby effectively expanding the training data and saving manpower and time costs.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0024] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0025] Figure 1 This is a flowchart of the first embodiment of the image classification method described in this disclosure;
[0026] Figure 2 This is a flowchart of the second embodiment of the image classification method described in this disclosure;
[0027] Figure 3 This is a schematic diagram illustrating the process of obtaining fusion features as described in this disclosure;
[0028] Figure 4 This is a schematic diagram of the composition structure of the image classification device embodiment 400 described in this disclosure;
[0029] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0030] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0031] Furthermore, it should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0032] Figure 1 This is a flowchart of a first embodiment of the image classification method described in this disclosure. Figure 1 As shown, the specific implementation methods are as follows.
[0033] In step 101, for any training dataset, the processing shown in steps 102-104 is performed respectively.
[0034] In step 102, M training data points are extracted from the training dataset, where M is a positive integer.
[0035] In step 103, data that matches the M training data are selected from the dataset to be labeled.
[0036] In step 104, the selected data is added to the training dataset as the expanded training data, wherein the training data in the training dataset have the same label.
[0037] As can be seen, the above-described method embodiments can automatically perform data mining based on existing training data and supplement it to the training dataset, thereby effectively expanding the training data, saving manpower and time costs, and improving data mining efficiency.
[0038] The specific types of training data included in the training dataset can be determined according to actual needs. For example, it can be image data, text data, voice data, or video data, or a combination of different types of data.
[0039] For example, in image classification scenarios, a classification model can be trained in advance using training data so that the model can be used to classify the images to be processed. Accordingly, the training dataset in this scenario can be an image dataset, and the data in the dataset to be labeled can also be image data.
[0040] There are no restrictions on how the training data in the training dataset is obtained. For example, it can be a relatively small amount of training data generated by manual annotation.
[0041] Generally speaking, training data in the same training dataset belong to the same class (category), that is, they have the same label. For example, in an image classification scenario, the training data (image data) in one training dataset are all labeled "cat", meaning they all belong to the "cat" class, while the training data in another training dataset are all labeled "dog", and so on.
[0042] For any training dataset, it can be processed in accordance with the manner described in this disclosure to achieve data mining.
[0043] First, M training data points can be extracted from the training dataset, where M is a positive integer and its specific value can be determined according to actual needs. There are no restrictions on how the data is extracted; for example, M training data points can be randomly extracted from the training dataset.
[0044] Next, data matching the M training data points can be selected from the dataset to be labeled. All data in the dataset to be labeled are unlabeled. Specifically, the features of the M training data points can be obtained separately, and based on the features of the M training data points and the features of each data point in the dataset to be labeled, data matching the M training data points can be selected from the dataset to be labeled.
[0045] The specific type of feature is not limited. Furthermore, the method of obtaining the feature is also not limited. For example, a pre-trained feature extraction model can be used to extract features from M training data points, and the same model can be used to extract features from each data point in the dataset to be labeled.
[0046] The feature extraction model is a pre-trained model. It can be used to extract features from each data point in the dataset to be labeled, and also to extract features from the extracted M training data points.
[0047] The above methods allow for the convenient and rapid acquisition of the required data characteristics, thus laying a solid foundation for subsequent processing.
[0048] When selecting data that matches the M training data based on the features of the M training data and the features of each data in the dataset to be labeled, the specific implementation method can vary depending on the value of M. For example, it can be as follows.
[0049] 1) If M is one, the distance between the features of the training data and the features of each data in the dataset to be labeled can be calculated. If the distance of any data is less than a predetermined threshold, the data can be selected as the matching data.
[0050] 2) If the value of M is greater than one, the fusion feature can be determined based on the features of the M training data, and the distance between the fusion feature and the features of each data in the dataset to be labeled can be calculated. If the distance corresponding to any data is less than a predetermined threshold, then the data can be used as the matched data to be selected.
[0051] In Method 1), the distance between the features of the training data and the features of each data point in the dataset to be labeled can be calculated directly, such as Euclidean distance. Data points with a distance less than a predetermined threshold can be selected as matching data. The specific value of the threshold can be determined according to actual needs.
[0052] In Method 2), the fusion features can be determined first based on the features of the M training data. Then, the distance between the determined fusion features and the features of each data in the dataset to be labeled can be calculated. Data with a distance less than a predetermined threshold can then be selected as matching data.
[0053] There are no restrictions on how to determine the fusion features. For example, the mean of the features of M training data can be calculated, and the calculated mean can be used as the required fusion feature.
[0054] In the above processing method, matching data can be accurately and efficiently filtered out based on the characteristics of the data by calculating distance, such as by mining data similar to that class through the average characteristics of data within the class, thereby achieving effective expansion of training data.
[0055] Accordingly, the selected data can be added to the training dataset as augmented training data. The augmented training data has the same labels as the original training data in the training dataset, meaning the labels of the original training data in the training dataset can be used as the labels of the augmented training data, eliminating the need for manual labeling and saving manpower and time costs.
[0056] If the predetermined termination condition is not met after this, the processing shown in steps 102-104 can be repeated to extract more training data and further expand the size of the training dataset.
[0057] The specific termination condition can be determined according to actual needs. For example, when the number of training data obtained from expansion reaches a predetermined number, it can be considered that the termination condition is met, and the loop ends. Otherwise, the processing shown in steps 102-104 can be repeated.
[0058] In practical applications, the following problems may arise: For a certain data in the dataset to be labeled, such as data a, when the processing shown in steps 102-104 is executed for the first time, data a is filtered out and added to the training dataset as the expanded training data. When the processing shown in steps 102-104 is executed for the second time, data a is filtered out again and needs to be added to the training dataset as the expanded training data. However, data a has already been added to the training dataset. Therefore, in order to avoid adding the same data repeatedly, save storage resources, and improve the quality of training data in the training dataset, the following processing can be further performed: For any filtered data, if it is determined that the data is not included in the training dataset, the data can be added to the training dataset as the expanded training data; otherwise, the data can be discarded.
[0059] The following example, which uses image data in both the training data and the dataset to be labeled, will be used to further illustrate the scheme described in this disclosure.
[0060] Figure 2 This is a flowchart of a second embodiment of the image classification method described in this disclosure. Figure 2 As shown, the specific implementation methods are as follows.
[0061] In step 201, for the training dataset, more than one training data point is randomly selected from it, wherein the training data is image data.
[0062] For example, in a training dataset where all the image data belongs to the category of "cats", multiple training data can be randomly extracted.
[0063] In step 202, the embedding features of each training data are extracted using a feature extraction model.
[0064] That is, the features extracted from the training data can be embedded features.
[0065] In step 203, the embedded features of each training data are fused to obtain fused features.
[0066] For example, the mean of the embedded features of each training data can be calculated, and the obtained mean can be used as the required fusion feature.
[0067] Figure 3 This is a schematic diagram illustrating the process of obtaining fusion features as described in this disclosure. Figure 3 As shown, assuming 10 training data points are randomly selected from the training dataset, namely training data 1 to training data 10, feature extraction can be performed on these 10 training data points to obtain the embedding features of each training data point, namely the embedding features of training data 1 minus the embedding features of training data 10. Then, the mean of the embedding features of training data 1 minus the embedding features of training data 10 can be calculated, and the obtained mean can be used as the required fusion feature.
[0068] In step 204, the distance between the fused feature and the embedded features of each image data in the dataset to be labeled is calculated.
[0069] The embedding features of each image data in the dataset to be labeled can be extracted in advance using a feature extraction model.
[0070] In step 205, the image data with a distance less than a predetermined threshold is selected as the matching image data.
[0071] Suppose the dataset to be labeled contains 10,000 images. The distances corresponding to these 10,000 images can be obtained. If the distances corresponding to 20 of these images are less than a predetermined threshold, then these 20 images can be selected as the matching images.
[0072] In step 206, the selected image data is added to the training dataset as the expanded training data.
[0073] For any selected image data, the following further processing can be performed: if it is determined that the image data is not included in the training dataset, the image data can be added to the training dataset as expanded training data; otherwise, the image data can be discarded.
[0074] In step 207, it is determined whether the predetermined termination condition is met. If yes, the process ends; otherwise, step 201 is repeated.
[0075] The predetermined termination condition can be defined as the amount of expanded training data reaching a predetermined quantity. If the predetermined termination condition is not met, the above process can be repeated starting from step 201 for the same training dataset.
[0076] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this disclosure is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this disclosure. Secondly, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this disclosure. Furthermore, for parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0077] The above is an introduction to the method embodiments. The following describes the solution described in this disclosure further through device embodiments.
[0078] Figure 4 This is a schematic diagram of the structural composition of an embodiment 400 of the image classification device described in this disclosure. Figure 4 As shown, it includes: an acquisition module 401 and a mining module 402.
[0079] Module 401 is used to obtain the training dataset.
[0080] Mining module 402 is used to perform the following first processing on the training dataset: extracting M training data from the training dataset, where M is a positive integer; filtering out data that matches the M training data from the dataset to be labeled; and adding the filtered data as expanded training data to the training dataset, wherein the training data in the training dataset have the same label.
[0081] There are no restrictions on how the training data in the training dataset is obtained. For example, it can be a relatively small amount of manually labeled training data. Generally speaking, training data in the same training dataset belong to the same class and have the same label.
[0082] For any training dataset, the mining module 402 can first extract M training data points, where M is a positive integer and the specific value can be determined according to actual needs. For example, M training data points can be randomly extracted from the training dataset.
[0083] Then, the mining module 402 can filter out data that matches the M training data from the dataset to be labeled. Specifically, it can obtain the features of the M training data separately, and filter out data that matches the M training data from the dataset to be labeled based on the features of the M training data and the features of each data in the dataset to be labeled.
[0084] For example, a pre-trained feature extraction model can be used to extract features from M training data, and the same model can be used to extract features from each data point in the dataset to be labeled.
[0085] When selecting data that matches the M training data based on the features of the M training data and the features of each data in the dataset to be labeled, the specific implementation method can vary depending on the value of M. For example, it can be as follows.
[0086] If the value of M is one, the mining module 402 can calculate the distance between the features of the training data and the features of each data in the dataset to be labeled. If the distance corresponding to any data is less than a predetermined threshold, then the data can be used as the matched data that has been filtered out.
[0087] If the value of M is greater than one, the mining module 402 can determine the fusion feature based on the features of the M training data, and can calculate the distance between the fusion feature and the features of each data in the dataset to be labeled. If the distance corresponding to any data is less than a predetermined threshold, then the data can be used as the matched data that has been selected.
[0088] The mean of the features of M training data can be calculated, and the calculated mean is used as the required fusion feature.
[0089] Accordingly, the mining module 402 can add the filtered data as expanded training data to the training dataset. After this, if it is determined that the predetermined termination condition is not met, the mining module 402 can repeat the first process.
[0090] For example, if the amount of training data obtained from the expansion reaches a predetermined amount, it can be considered that the termination condition is met; otherwise, it can be considered that the termination condition is not met.
[0091] Furthermore, for any selected data, if the mining module 402 determines that the data is not included in the training dataset, it can add the data as the expanded training data to the training dataset; otherwise, it can discard the data.
[0092] Figure 4 For the specific workflow of the device embodiment shown, please refer to the relevant descriptions in the foregoing method embodiments, which will not be repeated here.
[0093] In summary, by adopting the scheme described in the embodiments of the present invention, data mining can be automatically performed based on existing training data to supplement the training dataset, thereby effectively expanding the training data and saving manpower and time costs.
[0094] The solutions described in this disclosure can be applied to the field of artificial intelligence, particularly deep learning and computer vision. Artificial intelligence is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It involves both hardware and software technologies. Artificial intelligence hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. Artificial intelligence software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0095] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0096] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0097] like Figure 5 As shown, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0098] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0099] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as those described in this disclosure. For example, in some embodiments, the methods described in this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the methods described in this disclosure can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the methods described in this disclosure by any other suitable means (e.g., by means of firmware).
[0100] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0101] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0102] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0103] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0104] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0105] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service system, designed to address the management difficulties and weak business scalability inherent in traditional physical hosts and Virtual Private Servers (VPS). Servers can also be servers in distributed systems or servers integrated with blockchain. Cloud computing refers to a technology system that provides access to elastically scalable shared physical or virtual resource pools via a network. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology provides efficient and powerful data processing capabilities for applications such as artificial intelligence and blockchain, as well as model training.
[0106] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0107] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. An image classification method, comprising: For any training dataset, perform the following first processing: M training data points are extracted from the training dataset, where M is a positive integer, and the training data are image data; The features of the M training data are extracted using the pre-trained feature extraction model. Based on the features of the M training data and the features of each image data in the dataset to be labeled, image data that matches the M training data is selected from the dataset to be labeled; The selected image data is added to the training dataset as expanded training data; wherein, the training data in the training dataset have the same image classification label, the dataset to be labeled is an image dataset, and the data in the dataset to be labeled is image data; An image classification model is trained using the training dataset, and then used to classify the images to be processed; wherein, The step of selecting image data that matches the M training data from the dataset to be labeled, based on the features of the M training data and the features of each image data in the dataset to be labeled, includes: If M is one, the distance between the features of the training data and the features of each image data in the dataset to be labeled is calculated. If the distance corresponding to any image data is less than a predetermined threshold, the image data is selected as the matching image data. If the value of M is greater than one, then the fusion feature is determined based on the features of the M training data, and the distance between the fusion feature and the features of each image data in the dataset to be labeled is calculated. If the distance corresponding to any image data is less than a predetermined threshold, then the image data is selected as the matching image data.
2. The method according to claim 1, further comprising: After the selected image data is added to the training dataset as expanded training data, if it is determined that the predetermined termination condition is not met, the first process is repeated.
3. The method according to claim 1 or 2, wherein, The method further includes: using the feature extraction model to extract features from each image data in the dataset to be labeled.
4. The method according to claim 1, wherein, The step of determining the fusion features based on the features of the M training data includes: Calculate the mean of the features of the M training data, and use the mean as the fused feature.
5. The method according to claim 2, further comprising: For any selected image data, if it is determined that the image data is not included in the training dataset, then the image data is added to the training dataset as expanded training data; otherwise, the image data is discarded.
6. An image classification device, comprising: The system includes an acquisition module, a mining module, an image classification model, and a module for training the image classification model. The acquisition module is used to acquire the training dataset; The mining module is configured to perform the following first processing on the training dataset: extract M training data points from the training dataset, where M is a positive integer, and the training data points are image data; extract features from the M training data points using a pre-trained feature extraction model; based on the features of the M training data points and the features of each image data point in the dataset to be labeled, select image data points from the dataset to be labeled that match the M training data points; add the selected image data points as expanded training data to the training dataset; wherein the training data points in the training dataset have the same image classification label, the dataset to be labeled is an image dataset, and the data in the dataset to be labeled is image data; The module for training the image classification model is used to train the image classification model using the training dataset; The image classification model is used to classify the image to be processed; wherein... If M is one, the mining module calculates the distance between the features of the training data and the features of each image data in the dataset to be labeled. If the distance corresponding to any image data is less than a predetermined threshold, the image data is selected as the matching image data. If the value of M is greater than one, the mining module determines the fusion feature based on the features of the M training data, and calculates the distance between the fusion feature and the features of each image data in the dataset to be labeled. If the distance corresponding to any image data is less than a predetermined threshold, the image data is selected as the matching image data.
7. The apparatus according to claim 6, wherein, The mining module is further configured to, after adding the selected image data as expanded training data to the training dataset, repeat the first process if it is determined that the predetermined termination condition is not met.
8. The apparatus according to claim 6 or 7, wherein, The mining module uses the feature extraction model to extract features from each image data in the dataset to be labeled.
9. The apparatus according to claim 6, wherein, The mining module calculates the mean of the features of the M training data and uses the mean as the fused feature.
10. The apparatus according to claim 7, wherein, The mining module is further configured to, for any selected image data, if it is determined that the image data is not included in the training dataset, add the image data as expanded training data to the training dataset; otherwise, discard the image data.
11. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.
13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-5.