Picture type cultural resource classification method

By optimizing the LBP algorithm and SVM classifier, and combining local feature extraction and clustering models, the problems of accuracy and time cost in the classification of image-based cultural resources were solved, and efficient feature extraction and classification were achieved.

CN116136874BActive Publication Date: 2026-03-20NORTHEASTERN UNIV CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing technologies struggle to balance feature extraction accuracy and time cost in image-based cultural resources, especially in terms of efficient classification on large-scale training sets.

Method used

By employing the LBP algorithm optimization and SVM classifier, and combining local feature extraction, K-means clustering, and BOW model with the circular LBP operator model, the time cost of feature extraction is reduced, and high-precision classification is achieved through the SVM classifier.

Benefits of technology

It significantly reduces the time cost of feature extraction by nearly 40% while maintaining high-precision classification results, making it suitable for the classification of large-scale image-based cultural resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116136874B_ABST
    Figure CN116136874B_ABST
Patent Text Reader

Abstract

The picture type cultural resource classification method comprises the following steps: collecting a plurality of cultural resource image sets, dividing each large category image set into a training set and a test set, and preprocessing the training set; collecting texture features of the images in the training set, so that each pixel point in the image generates a corresponding LBP code; forming feature data corresponding to the sub-class label according to the LBP code, and training an identification model using the training set; extracting texture features of the test set, and then inputting the test set into the trained identification model to identify local features and label the sub-class label; performing K-means clustering on the images in the training set whose texture features have been extracted, constructing a BOW model, and obtaining a bag of words required by the model; inputting the images in the test set into the corresponding bag of words, obtaining a word frequency histogram as a global feature for each image, and inputting the global feature into a classifier for prediction to obtain a predicted large category; and step 7: completing the image returning of the test to the training set, and repeating step 4 to update the clustering.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of image classification, and relates to a picture type cultural resource classification method. BACKGROUND

[0002] At present, the high standards and high demands of user personalized recommendation are increasing, so efficient classification of cultural resources is particularly important. With the geometric level growth and change of cultural resources, its carrying form has also been transformed into a picture form dominated. In the face of feature extraction and intelligent classification of picture type cultural resources, the current technology in this direction is not mature, and it is difficult to reach the same precision and speed as the feature extraction and classification of text type cultural resources.

[0003] The technical solution of Chinese patent "CN 109359522 A small sample skin image classification method" is: initializing the classifier, including classifier structure initialization and classifier weight initialization; S2: obtaining image data; S3: classifying and labeling the data; S4: HOG gradient feature extraction, LBP texture feature extraction; S5: iteratively updating the classifier; S6: judging whether the classifier meets the accuracy requirement, if yes, saving the current parameters and ending the program, if not, continuing training. This scheme combines HOG and LBP two feature extraction methods, which ensures high precision of sample recognition, but also leads to high time cost of the classification method, which cannot adapt to a large number of training sets. This is also the disadvantage of most image classification methods at present: it is difficult to balance the precision and low time cost of feature extraction. SUMMARY

[0004] To solve the above technical problems, the purpose of the present application is to provide a picture type cultural resource classification method which can balance the precision and low time cost of feature extraction.

[0005] The picture type cultural resource classification method of the present application comprises:

[0006] Step 1: collect multiple cultural resource image sets, take each major image set as a sample set and divide it into a training set and a test set in proportion, pretreat the training set, and label the sub-class labels;

[0007] Step 2: collect texture features for each image in the training set, so that each pixel point in the image generates corresponding LBP code;

[0008] Step 3: form feature data corresponding to the sub-class label according to the LBP code of the pixel point, and use the training set to train the recognition model;

[0009] Step 4: perform the same texture feature extraction operation of step 2 on the test set, and then input it into the trained recognition model, identify the local features, and label the sub-class labels;

[0010] Step 5: K-means clustering is performed on the images in the training set whose texture features have been extracted, a BOW model is constructed, and a bag of words required by the model is obtained;

[0011] Step 6: The images in the test set are put into the corresponding bag of words, and each image obtains a term frequency histogram as a global feature, and the global feature is input into the classifier for prediction to obtain a predicted large category;

[0012] Step 7: The images that have completed testing are returned to the training set, and step 5 is repeated to update the clustering.

[0013] In the picture type cultural resource classification method of the application, the step 1 is specifically:

[0014] Step 1.1: All images are adjusted to a uniform pixel size according to the required accuracy;

[0015] Step 1.2: Each image set is divided into a training set and a test set according to an 8:2 ratio;

[0016] Step 1.3: According to the local features of each image in the training set, the image is labeled with multiple sub-class labels.

[0017] In the picture type cultural resource classification method of the application, the step 2 is specifically:

[0018] Step 2.1: Respectively take each pixel point as a center point, take P sampling points equidistantly on the circumference with a distance of R from the center point, and obtain the gray value of the sampling point. The coordinates of each sampling point are calculated by the following formula:

[0019]

[0020]

[0021] Where (x c , y c ) is the center point coordinate, (x p , y p ) is the sampling point coordinate, and p=0, 1, 2…P-1.

[0022] Step 2.2: Based on the LBP algorithm, compare the gray value of the sampling point with the gray value of the center point. If the gray value of the sampling point is greater than the gray value of the center point, the sampling point is set to 1, otherwise the sampling point is set to 0;

[0023] Step 2.3: The binary values corresponding to the P sampling points are combined to form the LBP feature value of the center point;

[0024] Step 2.4: In order to make the LBP algorithm not only reduce the influence of scale, but also have the characteristics of rotation invariance, after fixing the sampling radius R and the number P of the sampling points, a series of LBP feature values are obtained by continuously rotating the position of the sampling points, and the minimum one is selected as the LBP code of the center point;

[0025] Step 2.5: In order to solve the problem of too many binary patterns, LBP enters the equivalent pattern to reduce dimension, and when all the cyclic binary numbers jump at most twice from 0 to 1 or from 1 to 0, the LBP corresponding binary is called the equivalent pattern class, and the remaining patterns are classified into the mixed pattern class, so that the binary pattern is greatly reduced without information loss.

[0026] In the picture type cultural resource classification method of the application, if the sampling point coordinates obtained in step 2.1 are not integers, bilinear interpolation is used to obtain the pixel gray value of the sampling point:

[0027]

[0028] Among them,

[0029]

[0030]

[0031] Among them,

[0032] Q ij =(x i , y j )

[0033] y1=[y p ], y2=y1+1

[0034] x1=[x p ], x2=x1+1

[0035] Among them, [] is the integer function, and f(x) is the gray value at x point.

[0036] In the picture type cultural resource classification method of the application, step 3 is specifically:

[0037] Step 3.1: the LBP code of each point of the local feature corresponding to each sub-class label in the image is used to form the feature data of the sub-class label;

[0038] Step 3.2: the training set with completed texture feature extraction is imported into the recognition model for training.

[0039] In the picture type cultural resource classification method of the application, step 5 is specifically:

[0040] Step 5.1: the training set is divided into large categories, and the number of large categories is k, and each large category is taken as a bag of words;

[0041] Step 5.2: the BOW model is constructed by using a K-means clustering method, and multiple sub-class labels involved in the training set are divided into k clusters according to feature data of the sub-class labels, so that the similarity in the cluster is high, and the similarity between the clusters is low, finally, the requirement of k large categories is met, and labels with similar categories are classified into the same large category.

[0042] In the picture type cultural resource classification method of the application, the classifier in step 6 is specifically an SVM classifier.

[0043] The picture type cultural resource classification method has the following beneficial effects:

[0044] At present, most of the mature feature extraction technologies considering precision and time cost are concentrated on text data and specific scenes, such as face recognition, medical images and the like. The feature extraction and classification model suitable for the large base and medium precision requirement of the picture type cultural resource has not been mature. The LBP algorithm is optimized, the time cost of feature extraction is greatly reduced, and the circular LBP operator model is used. According to the comparison of several rounds of results, the time cost is reduced by nearly 40%. After comparison of different methods, the classification effect obtained by the circular LBP operator is the best. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 It is a flowchart of the picture type cultural resource classification method of the application. DETAILED DESCRIPTION

[0046] As shown in Figure 1 The picture type cultural resource classification method of the application comprises:

[0047] Step 1: a plurality of cultural resource image sets are collected, including but not limited to landscape, calligraphy and painting, and science and technology pictures, each large category of image set is taken as a sample set and is divided into a training set and a test set in proportion, the training set is preprocessed, and a sub-class label is calibrated, and step 1 specifically comprises:

[0048] Step 1.1: all images are adjusted to a uniform size of 480*480 pixels according to the precision requirement;

[0049] Step 1.2: each type of image set is divided into a training set and a test set according to a ratio of 8:2;

[0050] Step 1.3: According to the local features of each image in the training set, a plurality of sub-class labels are labeled for the image, and the sub-class label is a subdivision of the sub-class, for example, a large mountain, a large river, a person, etc. in an image are divided into a plurality of sub-classes.

[0051] Step 2: Collect texture features for each image in the training set, and generate a corresponding LBP code for each pixel point in the image, and the step 2 is specifically:

[0052] Step 2.1: Respectively take each pixel point as a center point, take P sampling points equidistantly on the circumference with a distance of R from the center point, and obtain the gray value of the sampling point, and the coordinates of each sampling point are calculated by the following formula:

[0053]

[0054]

[0055] Wherein, (x c , y c ) is the center point coordinate, (x p , y p ) is the sampling point coordinate, and p=0, 1, 2…P-1.

[0056] If the sampling point coordinate obtained in step 2.1 is not an integer, the pixel gray value of the sampling point is obtained by using bilinear interpolation:

[0057]

[0058] Wherein,

[0059]

[0060]

[0061] Wherein,

[0062] Q ij =(x i , y j )

[0063] y1=[y p ], y2=y1+1

[0064] x1=[x p ], x2=x1+1

[0065] Wherein, [] is the integral function, and f(x) is the gray value at x point.

[0066] Step 2.2: Based on the LBP algorithm, the gray value of the sampling point is compared with the gray value of the center point. If the gray value of the sampling point is greater than the gray value of the center point, the sampling point is set to 1, otherwise the sampling point is set to 0;

[0067] Step 2.3: The binary values corresponding to the P sampling points form the LBP feature value of the center point;

[0068] Step 2.4: In order to make the LBP algorithm not only reduce the influence of scale, but also have the characteristics of rotation invariance, after fixing the sampling radius R and the number P of the sampling points, a series of LBP feature values are obtained by continuously rotating the position of the sampling points, and the smallest one is selected as the LBP code of the center point;

[0069] Step 2.5: In order to solve the problem of too many binary patterns, LBP enters the equivalent mode to reduce dimension. When all the cyclic binary numbers jump at most twice from 0 to 1 or from 1 to 0, the binary corresponding to LBP is called equivalent mode class, and the rest is classified as mixed mode class. This greatly reduces the binary pattern without information loss.

[0070] In specific implementation, for example, in a 3x3 neighborhood of 8 sampling points, the binary pattern is reduced from 256 to 58, which greatly reduces the dimension of the feature vector.

[0071] Step 3: Form the feature data corresponding to the sub-class label according to the LBP code of the pixel point, and train the recognition model using the training set. The step 3 is specifically:

[0072] Step 3.1: The LBP code of each point of the local feature corresponding to each sub-class label in the image forms the feature data of the sub-class label;

[0073] Step 3.2: The training set with completed texture feature extraction is imported into the recognition model for training.

[0074] Step 4: The same texture feature extraction operation of step 2 is performed on the test set, and then input into the trained recognition model to identify the local feature and label the sub-class label;

[0075] Step 5: K-means clustering is performed on the images with extracted texture features in the training set to construct a BOW model, and the required bag of words of the model is obtained. The step 5 is specifically:

[0076] Step 5.1: The training set is divided into several large categories, and the number of large categories is k. Each large category is regarded as a bag of words;

[0077] In specific implementation, the image set is divided into several large categories according to the image content, such as natural scenery class training set, Chinese painting class training set, science and technology class training set or figure class training set.

[0078] Step 5.2: Constructing the BOW model uses the K-means clustering method to divide the multiple sub-class labels involved in the training set into k clusters according to the feature data of the sub-class labels, so that the similarity within the cluster is high, and the similarity between the clusters is low, finally satisfying the requirement of k large categories, and the labels belonging to the same large category are classified into the same large category.

[0079] Step 6: Put the images in the test set into the corresponding bag of words, and each image gets a word frequency histogram as a global feature, and input the global feature into the classifier for prediction to get the predicted large category;

[0080] In specific implementation, the classifier is specifically an SVM classifier.

[0081] Step 7: Complete the test image to the training set, and repeat step 5 to update the clustering.

[0082] The above only describes the preferred embodiments of the present application, and is not intended to limit the idea of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for classifying image-based cultural resources, characterized in that, include: Step 1: Collect image sets of multiple types of cultural resources, divide each major image set into a sample set and divide it into training set and test set according to the proportion, preprocess the training set and label the subclasses; Step 2: Collect texture features for each image in the training set, so that each pixel in the image generates a corresponding LBP code; Step 3: Based on the LBP encoding of the pixels, form the feature data corresponding to the subclass labels, and use the training set to train the recognition model; Step 4: Perform the same texture feature extraction operation as in Step 2 on the test set, then input it into the trained recognition model to identify local features and label the subclasses. Step 5: Perform K-means clustering on the images with extracted texture features in the training set, construct the BOW model, and obtain the bag of words required by the model; Step 6: Put the images in the test set into the corresponding bag of words. Each image will have a word frequency histogram as a global feature. Input the global feature into the classifier for prediction to obtain the predicted major category. Step 7: Return the completed test images to the training set, and repeat Step 5 to update the clustering; Step 3 specifically involves: Step 3.1: Encode each point of the local features corresponding to each subclass label in the image using LBP encoding to form the feature data of that subclass label; Step 3.2: Import the training set with extracted texture features into the recognition model for training; Step 5 specifically involves: Step 5.1 Divide the training set into major categories, with k major categories, and each major category is a bag of words; Step 5.2: Construct the BOW model using K-means clustering. Based on the feature data of the subclass labels, divide the multiple subclass labels involved in the training set into k clusters so that the similarity within the cluster is high and the similarity between the clusters is low, and finally meet the requirement of k major categories, and group the labels with similar categories into the same major category.

2. The image-based cultural resource classification method as described in claim 1, characterized in that, Step 1 specifically involves: Step 1.1: Adjust all images to a uniform pixel size according to the required precision; Step 1.2: Divide the various image sets into training and testing sets in an 8:2 ratio; Step 1.3: Assign multiple subclass labels to each image based on the local features of each image in the training set.

3. The image-based cultural resource classification method as described in claim 1, characterized in that, Step 2 specifically involves: Step 2.1: Taking each pixel as the center point, take P sampling points at equal intervals on a circle at a distance R from the center point, and obtain the gray value of each sampling point. The coordinates of each sampling point are calculated using the following formula: Among them, (x) c y c (x) represents the coordinates of the center point. p y p () represents the coordinates of the sampling point. ; Step 2.2: Based on the LBP algorithm, compare the gray value of the sampling point with the gray value of the center point. If the gray value of the sampling point is greater than the gray value of the center point, set the sampling point to 1; otherwise, set the sampling point to 0. Step 2.3: Combine the binary values ​​corresponding to the P sampling points to form the LBP feature value of the center point; Step 2.4: In order to make the LBP algorithm not only reduce the influence of scale, but also have the characteristic of rotation invariance, after fixing the sampling radius R and the number P of the sampling points, a series of LBP feature values ​​are obtained by continuously rotating the position of the sampling points, and the smallest one is selected as the LBP code of the center point. Step 2.5: To solve the problem of too many binary patterns, LBP enters the equivalent pattern to reduce dimensionality. When all cyclic binary numbers have at most two jumps from 0 to 1 or from 1 to 0, the binary corresponding to LBP is called the equivalent pattern class, and the rest are classified as the mixed pattern class. This greatly reduces the number of binary patterns and there is no information loss.

4. The image-based cultural resource classification method as described in claim 3, characterized in that, In step 2, if the coordinates of the sampling point obtained in step 2.1 are not integers, bilinear interpolation is used to obtain the pixel grayscale value of that sampling point: in, in, Where [ ] is the floor function, and f(x) is the gray value at point x.

5. The method for classifying image-based cultural resources as described in claim 1, characterized in that, The classifier in step 6 is specifically an SVM classifier.

Citation Information

Patent Citations

  • A method for classifying small sample skin images

    CN109359522A

  • Vision lexicon based remote sensing image terrain classification method

    CN105005789A

  • Construction waste material visual identification method based on feature code fusion

    CN114580569A