An active learning image classification method and visual interactive system

By combining Mahalanobis Distance and information entropy to filter samples, and using a residual network model to train image classification, the problem of high-cost annotation and training is solved, and efficient image classification and system visualization interaction are achieved.

CN115661506BActive Publication Date: 2026-05-19TIANJIN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2022-09-14
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing image classification methods struggle to efficiently select valuable samples, resulting in high annotation and model training costs.

Method used

Unlabeled samples were screened using a combination of Mahalanobis Distance and information entropy. The residual network model was then trained and updated until the required accuracy was achieved.

Benefits of technology

It achieves high accuracy in image classification with fewer samples, reducing annotation and training costs. At the same time, a visual interactive system is designed to improve system maintenance efficiency and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115661506B_ABST
    Figure CN115661506B_ABST
Patent Text Reader

Abstract

The application provides a kind of active learning image classification method and visual interactive system.It is characterized in that the classification method includes: dividing sample set, selecting a few samples to mark and training basic network model, calculating the Mahalanobis entropy of unmarked sample, sorting according to the method, selecting the sample with higher score to join the training set, and retraining and updating the network model.The application uses the data evaluation method combining Mahalanobis Distance and information entropy to screen and mark the unmarked sample, greatly improves the efficiency of model training, and makes the model with excellent effect in a shorter time.At the same time, the application also proposes a visual interactive system covering the above method, integrates the interaction and processing of sample data, model parameter setting and training, and effect display into a system, which provides great convenience for related researchers' scientific research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning image classification, and specifically to a method for actively learning image classification and a visual interactive system. Background Technology

[0002] In recent years, deep learning, as a cornerstone of the rise of artificial intelligence, has been the subject of extensive research on refining its network structures. Most notably, deep learning models have made remarkable progress in fields such as natural language processing and computer vision due to their powerful data representation learning capabilities. It is worth noting that the successful training of supervised deep learning models still relies heavily on a large amount of labeled data. In an increasing number of scenarios and tasks, a situation has arisen where large amounts of unlabeled data are readily available, and the collection and labeling of this data undoubtedly consumes significant resources. For example, in the field of medical images, the high requirements for annotation quality necessitate a deep understanding of medical knowledge. This means that the annotation of medical images typically needs to be completed by experienced experts. Having others handle the labeling requires substantial learning and time costs.

[0003] Active learning offers a solution to the aforementioned problems. The specific approach involves selecting one or more of the most uncertain but important samples from the unlabeled sample pool and having them manually queried and labeled. After obtaining the labels, these samples are added to a labeled sample pool, forming a new labeled sample pool for supervised learning of the machine learning model. Then, based on the newly learned machine learning model, samples are selected for the next round of labeling, and these newly labeled samples are added to the labeled sample pool, and the model is trained again. By prioritizing the labeling of more valuable samples through active learning algorithms, the number of labeled samples required is minimized, thus addressing the problem of excessively high labeling or training costs.

[0004] Existing image classification methods are not good at filtering out more valuable samples and also incur model training costs. Therefore, it is particularly important to accurately evaluate and filter data to achieve more efficient training. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention aims to provide an active learning image classification method and a visual interactive system. To solve the aforementioned technical problems, this invention adopts the following technical solution:

[0006] An active learning image classification method includes:

[0007] (1) First, all sample sets are divided into labeled sample sets and unlabeled sample sets. These two sets contain the corresponding images and labels respectively, and are updated at all times;

[0008] (2) Select a small set of labeled samples and train the basic network model using the residual network model (Resnet18);

[0009] (3) Calculate the Mahalanobis entropy of the sample and evaluate and rank the data in the unlabeled set;

[0010] (4) By extracting features, we obtain high-dimensional feature vectors of the training set and perform weighted averaging to obtain the prototypes of each category of the samples;

[0011] (5) Calculate the Mahalanobis Distance between the high-dimensional feature vector of each sample in the unlabeled set and the class prototype to obtain the Mahalanobis Distance vector;

[0012] (6) Map Mahalanobis Distance to a probability distribution with a sum of 1 using the softmax function;

[0013] (7) Calculate Mahalanobis entropy using the entropy formula based on the above probability distribution, and sort the samples corresponding to Mahalanobis entropy in ascending order.

[0014] (8) Select U samples from the sorted unlabeled set. The selected data is called the unlabeled set. Manually label these samples. After labeling, add the unlabeled set to the labeled sample set, and use the new labeled sample set to train and update the network model.

[0015] (9) Repeat the above steps until the accuracy of network training reaches the required threshold.

[0016] On the other hand, the present invention also provides an active learning image classification visualization and interactive system based on front-end and back-end separation, comprising:

[0017] Data Interaction Layer: This layer primarily addresses the system's data storage needs while also facilitating data exchange and transmission between different modules. This layer corresponds to the user data upload interface on the front-end page. It can receive user-uploaded datasets and record user annotation information. This information is then packaged with the dataset and stored in the DM database. The system is configured with JDBC for easy access to this database.

[0018] Data Processing Layer: This layer processes the incoming data, including classifying and managing the data, extracting relevant features from the samples, calculating Mahalanobis Distance and information entropy, and sorting the samples to be labeled for easier selection. This information is recorded and stored locally as files, and also transmitted to the server, where it is recorded and uploaded to the Dream Database.

[0019] Model Training Layer: This layer contains a large number of algorithm models. Users can select the algorithm model to use using their own uploaded datasets or those provided by the system, set the relevant parameters, and then train the model on the server side by calling the pre-packaged Python network model. Interfaces are also provided here for the front-end to call and display the training process and results.

[0020] Front-end page layer: This layer mainly implements information display and interaction. It adopts a progressive framework based on Vue and uses the Echarts visualization chart library to display various data changes during model training on the front-end page.

[0021] The beneficial effects of this invention lie in providing a novel active learning image classification method and a visual interactive system for the field of image classification. Currently, image classification in deep learning typically requires a large amount of labeled data to train the network, but the cost of sample labeling is very high, and achieving a large number of labeled samples is even more difficult. This invention solves the pain point of requiring a large number of labeled samples in image classification while ensuring classification accuracy, achieving the effect of 100% training with only about 60% of the samples. Furthermore, considering the difficulty of evaluating valuable samples in active learning, compared with existing technologies, this invention proposes a combination of Mahalanobis Distance and information entropy to screen more representative and information-rich samples, thereby reducing redundancy. This method can eliminate interference from correlations between samples, making the selected samples more suitable. In addition, a visual interactive system is designed for the method. This system integrates the active learning image classification method described in this invention, providing users with multiple ports to adjust parameters and clearly understand the workflow of each module while solving image classification problems. Moreover, because it uses a front-end and back-end separation approach, the entire system has the advantages of lower maintenance costs, higher efficiency, and better performance. Attached Figure Description

[0022] Figure 1 This is a flowchart of an active learning image classification method in a specific embodiment of the present invention;

[0023] Figure 2This is a flowchart of an active learning image classification data evaluation method in a specific embodiment of the present invention;

[0024] Figure 3 This is a structural diagram of an active learning image classification visualization and interactive system according to a specific embodiment of the present invention; Detailed Implementation

[0025] according to Figure 1 The diagram shown is a flowchart of an active learning image classification method according to a specific embodiment of the present invention. The method includes the following steps:

[0026] S1 first divides all sample sets into labeled sample sets and unlabeled sample sets;

[0027] S2 selects a small set of labeled samples and trains the basic network model using the residual network model (Resnet18);

[0028] S3 calculates the Mahalanobis entropy of the samples and evaluates and ranks the data in the unlabeled set;

[0029] S4 selects U data points, i.e., valuable data, from the sorted unlabeled set. The selected data is called the unlabeled set. These samples are manually labeled. After labeling, the unlabeled set is added to the labeled sample set, and the network model is trained and updated using the new labeled sample set.

[0030] S5 repeats the above steps until the network training accuracy reaches the required threshold.

[0031] according to Figure 2 The diagram shows a flowchart of an active learning image classification data evaluation method according to a specific embodiment of the present invention. The method specifically includes the following steps:

[0032] S31 extracts high-dimensional feature vectors from the training set and performs weighted averaging to obtain the prototypes of each category of the samples.

[0033] S32 uses the formula Calculate the Mahalanobis Distance D between the high-dimensional feature vector of each sample in the unlabeled set and the class prototype to obtain the Mahalanobis Distance vector D = [d1, d2, ..., dn].

[0034] S33 maps Mahalanobis Distance to a probability distribution with a sum of one according to the softmax function;

[0035] S34 calculates the information Mahalanobis entropy using the entropy formula based on the above probability distribution, and sorts the samples corresponding to Mahalanobis entropy in ascending order.

[0036] Please refer to Figure 3 It illustrates a structural diagram of an active learning classification visualization and interactive system provided by an embodiment of the present invention, which may include:

[0037] Data Interaction Layer: This layer primarily addresses the system's data storage needs while also facilitating data exchange and transmission between different modules. This layer corresponds to the user data upload interface on the front-end page. It can receive user-uploaded datasets and record user annotation information. This information is then packaged with the corresponding dataset and stored in the DM database. The system is configured with JDBC for easy access to this database.

[0038] Data Processing Layer: This layer processes the incoming data, including classifying and managing the data, extracting relevant features from the samples, calculating Mahalanobis Distance and information entropy, and sorting the samples to be labeled for easier selection. This information is recorded and stored locally as files, and also transmitted to the server, where it is recorded and uploaded to the Dream Database.

[0039] Model Training Layer: This layer contains a large number of algorithm models. Users can select the algorithm model to use from their own uploaded datasets or those provided by the system, set the relevant parameters, and then train the model on the server side by calling a pre-packaged Python network model. Interfaces are also provided here for the front-end to call and display the training process and results.

[0040] Front-end page layer: This layer mainly implements information display and interaction. It adopts a progressive framework based on Vue and uses the Echarts visualization chart library to display various data changes during model training on the front-end page.

Claims

1. An active learning image classification method, characterized in that, include: (1) First, divide all sample sets into labeled sample sets and unlabeled sample sets; (2) Select a small set of labeled samples and train the basic network model using the residual network model; (3) Calculate the Mahalanobis entropy of the samples and evaluate and rank the data in the unlabeled set. Specifically, this includes: extracting high-dimensional feature vectors of the training set through feature extraction and performing weighted averaging to obtain the prototypes of each class of samples; calculating the Mahalanobis Distance between the high-dimensional feature vectors of each sample in the unlabeled set and the class prototypes to obtain the Mahalanobis Distance vector; mapping the Mahalanobis Distance to a probability distribution with a sum of 1 according to the softmax function; and finally calculating the information Mahalanobis entropy using the entropy formula based on the above probability distribution, and sorting the samples corresponding to the Mahalanobis entropy in ascending order. (4) Select U data points, i.e. valuable data, from the sorted unlabeled set. The selected data is called the unlabeled set. Manually label these samples. After labeling, add the unlabeled set to the labeled sample set and use the new labeled sample set to train and update the network model. (5) Repeat the above steps until the accuracy of network training reaches the required threshold.

2. The active learning image classification method according to claim 1, characterized in that: The first step is to divide all sample sets into labeled sample sets and unlabeled sample sets. The division further includes: the division of all sample sets into labeled sample sets and unlabeled sample sets, all of which carry label information and can be updated during the training process.

3. A front-end and back-end separated active learning image classification visualization interactive system, used to implement the method of any one of claims 1-2, comprising: (1) Data interaction layer: This layer is mainly for the data storage needs of the system, while also taking into account the data exchange and transmission between the modules of the system. (2) Data processing layer: This layer processes the incoming data, including classifying and managing the data, extracting relevant features of the samples, calculating Mahalanobis Distance and information entropy, and sorting the samples to be labeled for easy selection; (3) Model training layer: This layer contains a large number of algorithm models. Users can use their own uploaded or system-provided datasets, select the algorithm model to use, set the relevant parameters, and then call the encapsulated Python network model through the backend to train the model on the server side. (4) Front-end page layer: This layer mainly realizes the display and interaction of information.