Image recognition and classification method and system based on artificial intelligence
By performing data enhancement and feature association analysis on images and combining it with support vector machine classification, the recognition accuracy problem of image recognition technology in different environments and noises is solved, and more efficient scene recognition and feature classification are achieved.
Patent Information
- Application Number
- CN202510863735.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-26
AI Technical Summary
Existing AI-based image recognition technology performs poorly when processing images in different environments, at different angles, and under different lighting conditions, and it is difficult to effectively deal with noise and occlusion problems, resulting in reduced recognition accuracy.
By performing data enhancement on images, including rotation, scaling, cropping, flipping, brightness adjustment, and noise addition, combined with cluster analysis, association rule analysis, and spatial pattern analysis, the spatial and functional requirement information of image features is extracted and associated, and scene classification is performed using support vector machines.
The robustness and recognition ability of the image recognition model have been improved, which can better cope with changing environmental factors and improve the precision and accuracy of scene recognition.
Smart Images

Figure CN120707958A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence image recognition and classification, and specifically to an image recognition and classification method and system based on artificial intelligence. Background Art
[0002] Artificial intelligence-based image recognition and classification methods are a key branch of computer vision. They utilize machine learning and deep learning techniques to identify and classify objects, scenes, or activities in images. Before the rise of artificial intelligence, image recognition primarily relied on traditional image processing techniques, such as edge detection, feature descriptors (e.g., SIFT and SURF), and machine learning algorithms (e.g., support vector machines (SVMs)). These methods often require manual feature design and are limited in effectiveness when processing complex images. With the development of machine learning algorithms, particularly breakthroughs in deep learning algorithms, image recognition technology has significantly advanced. Deep learning can automatically learn features from large amounts of data without human intervention. Convolutional neural networks (CNNs), in particular, have made revolutionary progress in image recognition, capturing hierarchical features of images, from low-level edges to high-level semantic features, significantly improving image recognition accuracy. Advances in image recognition technology have also benefited from the advent of the big data era and increased computing power. Large annotated image datasets (e.g., ImageNet) and powerful GPU computing resources have made it possible to train complex deep learning models. To reduce training time and data requirements, researchers have developed pre-trained models and fine-tuned them on specific tasks through transfer learning. This allows even tasks with limited data to leverage the power of deep learning. AI-based image recognition and classification methods have been widely applied in various fields, including medical image analysis, autonomous driving, security monitoring, retail analytics, and agricultural monitoring. Image recognition technology continues to advance, including more efficient network architectures (such as ResNet and EfficientNet), improved regularization methods, attention mechanisms, and multimodal learning that incorporates other modalities (such as text and audio). AI-based image recognition and classification methods are becoming increasingly accurate and efficient, and their development has not only driven progress in the field of computer vision but has also had a profound impact on various industries.
[0003] Although AI-based image recognition and classification methods have made significant progress, existing technologies still have some defects. First, existing image recognition technologies mainly rely on manually designed features (such as edges, corners, etc.) and manually extracted high-dimensional features. This method often requires a lot of domain knowledge and manual intervention. Moreover, existing methods often perform poorly for images in different environments, at different angles, and under different lighting conditions because they find it difficult to effectively handle the diversity and complexity of the data. Second, traditional image recognition methods usually rely on image preprocessing steps such as denoising and edge detection when dealing with noise and occlusion, but these methods are not always able to effectively deal with complex noise interference or occlusion problems. For example, in some harsh environments (such as low light, high noise, etc.), traditional algorithms may lose key information, resulting in a significant decrease in recognition accuracy. As for occlusion problems in images, traditional methods usually rely on manually designed features to compensate for occluded areas, but these features often cannot fully express the appearance of objects, resulting in classification errors. Summary of the Invention
[0004] In response to the problems mentioned in the above background technology, an image recognition and classification method and system based on artificial intelligence are proposed.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] In a first aspect, the present invention provides an image recognition and classification method based on artificial intelligence, comprising:
[0007] Step 1: Perform data enhancement on the image;
[0008] Step 2: Identify and label the enhanced image data, specifically:
[0009] The identified and annotated image features are analyzed for correlation to obtain the scene matching degree; if the scene matching degree is less than the preset scene matching threshold, the corresponding recognition scene is obtained, and the remaining image features are analyzed according to the corresponding recognition scene; if the scene matching degree is greater than or equal to the preset scene matching threshold, the best matching recognition scene is used as the corresponding recognition scene, and the remaining image features are analyzed according to the corresponding recognition scene to obtain the Euclidean distance d; the feature similarity of each sample is obtained through feature matching; the scene is classified: in scene classification, the extracted feature similarity is used as input. If the input is a data set {(x1,y1),(x2,y2),…,(x n1 ,y n1 )},x i2 is the characteristic vector of the sample, y i2 ∈{-1,+1} is the corresponding category label; then the hyperplane is expressed as a linear equation: (w Tx+b)=0, where w is the normal vector and b is the bias term; finally, the dual form of SVM is obtained; by solving the dual problem, the optimal w and b are obtained; the classification decision is judged: y=sign(w T x+b), if w T x+b>0, it belongs to the positive class (y=+1), which is the corresponding scene for recognition; if w T x+b<0, belongs to the negative class (y=-1), and there is no corresponding scene;
[0010] After the scene is confirmed, feature recognition analysis is performed; spatial position correlation analysis is performed on the features to obtain the spatial position correlation coefficient C i3j2 ; Perform functional requirement correlation analysis on the features to obtain the functional requirement correlation coefficient G i3j2 ; If the functional requirement correlation coefficient G i3j2 >Functional requirement correlation threshold and spatial position correlation coefficient C i3j2 >If the spatial position correlation threshold is met, the corresponding identification is performed; otherwise, it is manually identified.
[0011] As a preferred embodiment of the present invention, the specific process of performing data enhancement on the image is:
[0012] S101: Rotate the image: randomly select an angle and rotate the image;
[0013] S102: scaling the image: simulating objects at different distances by changing the size of the image;
[0014] S103: Cropping the image: Randomly cropping parts of the image, retaining the center of the image or a random area, focusing on different parts of the object, and enhancing the model's adaptability under different visual field conditions;
[0015] S104: flip the image horizontally or vertically;
[0016] S105: changing the brightness, contrast, and saturation of the image, and randomly adjusting the brightness, contrast, and saturation of the image to simulate different lighting conditions;
[0017] S106: adding noise, adding a certain amount of random noise to the image;
[0018] S107: Occluding the image: randomly occluding a portion of the image.
[0019] As a preferred embodiment of the present invention, the specific process of performing correlation analysis on the identified and marked image features to obtain the scene matching degree is as follows:
[0020] Group similar features into the same group; by formula: The output is to optimize the cluster division by minimizing the distance between the sample and the cluster center, J is the objective function; n is the number of samples, K is the number of clusters, x i is the i-th sample, μ k is the center of the kth cluster; ||(x i ∈C k ) is the indicator function; ||x i -μ k || 2 It is the square of the Euclidean distance between the sample and the cluster center; the image features are clustered by K-means to obtain similar groups between features;
[0021] Discover frequent association patterns between features, and calculate the support, confidence, and lift formulas:
[0022] Support: Output the frequency ZCD(X) of a specific feature combination X in all samples, where TZ(X) is the number of times the feature combination X appears in the data, and N is the total number of samples in the data set; confidence level: Lift: Spatial pattern analysis, using the formula: Output Moran index I, N1 is the number of samples, W is the sum of the weight matrix; ω i1j are the elements of the spatial weight matrix; x i1 ,x j are the eigenvalues of the i1-th and j-th samples, is the mean of the feature;
[0023] The Moran index, support, lift, confidence and similarity between the correlation analysis and cluster analysis are matched in the image tag scene library, and the range comparison is performed with the Moran index, support, lift, confidence and similarity between the corresponding scenes in the scene library, and the absolute difference between the range comparisons is calculated to obtain the Moran index pair difference, support absolute difference, lift pair difference, confidence pair difference and similarity pair difference between cluster analysis, and are recorded as I', ZCD', TSD', ZXD' and J' respectively. The formula is established: The output scene matching degrees MR and AA are both preset correction factors.
[0024] As a preferred embodiment of the present invention, the specific process of analyzing the remaining image features corresponding to the recognition scene to obtain the Euclidean distance d is:
[0025] Extract scene features and extract color features based on the color distribution of the scene; different scenes may have different texture features; different objects and structures in the scene have different shape features, and extracting these features helps to classify the scene; the edge detection algorithm extracts the outline of the object in the scene, which provides a basis for scene recognition; the extracted features are matched with the feature library of known scenes, and the scene type is confirmed by calculating the similarity between the features; the extracted feature points, including the key points identified in different scale spaces, calculate the main direction of each key point, and make it rotation invariant; if the extracted image feature point set is {x1,x2,…,x n1}, and the feature point set of the known scene is {y1,y2,…,y m1}, by calculating the similarity between the two feature point descriptors; by formula: Euclidean distance d, where f i2 and f j1 They are the feature points x i2 and y j1 Descriptor of .
[0026] As a preferred embodiment of the present invention, the specific process of classifying scenes is as follows:
[0027] In scene classification, the extracted feature similarity is used as input. If the input is a data set {(x1,y1),(x2,y2),…,(x n1 ,y n1 )}; The goal of SVM is to maximize the interval, and the interval formula is derived through steps: The interval formula is: To achieve this, it is necessary to minimize ||w|| 2 , because maximizing the margin is equivalent to minimizing ||w||; the objective function of SVM can be written as: For each sample x i2 , whose category label y i2 The following constraints must be met: x i2 is the eigenvector of the i2th sample, y i2 is a label; the objective function and constraints constitute a constrained optimization problem. To solve this problem, SVM uses the Lagrange multiplier method to convert it into a dual problem; the Lagrange function L is: λ i2 is the Lagrange multiplier; by taking the derivative of this Lagrange function and setting it to zero, we can finally get the dual form of SVM; by solving the dual problem, we can get the optimal w and b.
[0028] As a preferred embodiment of the present invention, the spatial position correlation coefficient C is obtained by performing spatial position correlation analysis on the features. i3j2The specific process is:
[0029] If there are two feature points P i3 (x i3 ,y i3) and P j2 (x j2 ,y j2 ), calculate the Euclidean distance D2 between them: By calculating their relative position vector R i3j2 =(x j2 -x i3 ), (y j2 -y i3 ) and the angle Then the spatial position correlation coefficient C i3j2 , expressed using the weighted formula: a1, a2, and a3 are preset weight coefficients.
[0030] As a preferred embodiment of the present invention, the function requirement correlation coefficient G is obtained by performing function requirement correlation analysis on the features. i3j2 The specific process is:
[0031] There are two feature points P i3 and P j2 , the corresponding functional requirements are F i3 and F j2 ;Matching degree of functional requirements i3j2 It is expressed by a weighted difference formula: M i3j2 =b1×|F i3 -F j2 |+b2×||A i3 -A j2 ||,F i3 and F j2 Represents the features P i3 and P j2 Functional requirements, A i3 and A j2 Indicates their attribute values, b1 and b2 are preset weight coefficients; functional requirement correlation coefficient G i3j2 By setting up the formula:
[0032] In a second aspect, the present invention provides an image recognition and classification system based on artificial intelligence, comprising: a data enhancement module, an image recognition and classification module, and a field classification and power demand connection module;
[0033] The data enhancement module performs a series of enhancement operations on the image;
[0034] The image recognition and classification module is responsible for labeling and feature extraction of the enhanced image, and uses cluster analysis, association rule analysis, and spatial pattern analysis techniques to analyze the correlation between features;
[0035] After matching image features, the field classification module classifies the image into scenes and further analyzes the correlation between the spatial position of the scene features and the functional requirements.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] 1. This paper describes various image enhancement techniques (such as rotation, scaling, cropping, flipping, brightness and contrast adjustment, etc.). Its purpose is to enhance the diversity of image data by simulating different shooting conditions, thereby improving the robustness and recognition ability of the model. In this process, various image transformations help the model adapt to changing environmental factors such as angle, distance, lighting and noise, so that the trained model can better cope with various challenges that may arise in the real world.
[0038] 2. The present invention focuses on the feature recognition and analysis of images. Through cluster analysis, association rule analysis, spatial pattern analysis and other technologies, the enhanced images are deeply mined to extract and associate the spatial and functional requirement information of different feature points. These analyses can help the model identify specific scenes and compare them based on a known scene feature library, thereby improving the accuracy of classification and scene matching. Specifically, through the SVM algorithm and spatial position correlation analysis, the accuracy of scene recognition is further improved to ensure the correct classification and positioning of features. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] To facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0040] Figure 1 Schematic diagram of the method steps of the present invention;
[0041] Figure 2 This is a schematic diagram of module connection of the present invention. DETAILED DESCRIPTION
[0042] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0043] It should be understood that the terms “include” and “comprising” used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0044] It should also be understood that the terminology used in this disclosure is for the purpose of describing specific embodiments only and is not intended to limit the disclosure. As used in this disclosure and the claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should be further understood that the term "and / or" as used in this disclosure and the claims refers to any and all possible combinations of one or more of the associated listed items, including and including these combinations.
[0045] Example 1:
[0046] See also Figure 1 As shown, the present invention provides an image recognition and classification method based on artificial intelligence, comprising:
[0047] Step 1: Perform data enhancement on the image, specifically:
[0048] S101: Rotate the image by randomly selecting an angle. The typical rotation angle range is between -45° and +45°, and the specific range can be adjusted according to task requirements. Rotation can help the model recognize the appearance of objects at different angles, thereby improving the robustness of the model.
[0049] S102: Scaling the image to simulate objects at different distances by changing the image size. For example, randomly selecting a scaling factor to scale the image up or down proportionally. A common practice is to randomly scale the image by a certain ratio (e.g., between 0.8 and 1.2) to simulate the effects of different shooting distances.
[0050] S103: Cropping the image, randomly cropping parts of the image, retaining the center of the image or a random area, focusing on different parts of the object, and enhancing the model's adaptability to different field of view conditions. A common practice is to randomly select a cropping box, the size of which can be adjusted according to the ratio of the image size (e.g., between 0.7 and 1.0);
[0051] S104: Flip the image horizontally or vertically; this enhancement helps the model handle the appearance of objects in different orientations, especially when the objects are symmetrical.
[0052] S105: changing the brightness, contrast, and saturation of the image, randomly adjusting the brightness, contrast, and saturation of the image to simulate different lighting conditions; for example, randomly increasing or decreasing the brightness and adjusting the contrast of the image to make the details of the image clearer or more blurred;
[0053] S106: Adding noise: adding a certain amount of random noise to the image, such as Gaussian noise or salt and pepper noise. Noise can simulate sensor interference or undesirable shooting conditions, improving the robustness of the model so that it can still perform well on low-quality or noisy data.
[0054] S107: Occluding the image by randomly occluding parts of the image, for example, by randomly placing a rectangular or other shaped occluding object to simulate the situation where part of the object is occluded; this helps train the model to recognize the partially occluded object;
[0055] Step 2: Identify and label the enhanced image data, specifically:
[0056] S201: Perform correlation analysis on the identified and labeled image features, using cluster analysis, association rule analysis, or correlation matrix techniques to find the relationship between the features. Specifically:
[0057] Cluster analysis is to group similar features into the same group by measuring the similarity between features; through the formula: Output minimizes the distance between the sample and the cluster center to optimize the cluster division, J is the objective function; n is the number of samples, K is the number of clusters, x i is the i-th sample, μ k is the center of the kth cluster; ||(x i ∈C k ) is the indicator function, representing the sample x i Belongs to cluster C k ;||x i -μ k || 2 It is the square of the Euclidean distance between the sample and the cluster center; the image features (such as color distribution, edge information, etc.) are clustered by K-means to obtain similar groups between features;
[0058] Association rule analysis is often used to discover frequent association patterns between features. The calculation formulas for support, confidence, and lift are:
[0059] Support: Indicates the frequency of a specific feature combination in all samples; formula: Output the frequency ZCD(X) of a specific feature combination X in all samples, where TZ(X) is the number of times feature combination X appears in the data, and N is the total number of samples in the dataset;
[0060] Confidence: Indicates the probability that feature B exists when feature A exists; formula:
[0061] Lift: Measures the strength of the correlation between features A and B. A larger lift indicates a stronger correlation between the two. Formula:
[0062] The Apriori algorithm is used to mine association rules between image features, find patterns of frequent co-occurrence between features, and then infer their co-occurrence patterns in certain scenes;
[0063] Spatial pattern analysis, which quantifies the correlation of features in space through spatial autocorrelation; formula: Output Moran index I, N1 is the number of samples, W is the sum of the weight matrix; ω i1j is an element of the spatial weight matrix, which represents the spatial relationship between sample i1 and sample j; x i1 ,x j are the eigenvalues of the i1-th and j-th samples, is the mean of the features; by calculating the Moran index I of each pixel or region in the image, the degree of clustering of features in space is determined, thereby identifying the spatial pattern in the image;
[0064] The Moran index, support, lift, confidence and similarity between the correlation analysis and cluster analysis are matched in the image tag scene library, and the range comparison is performed with the Moran index, support, lift, confidence and similarity between the corresponding scenes in the scene library, and the absolute difference between the range comparisons is calculated to obtain the Moran index pair difference, support absolute difference, lift pair difference, confidence pair difference and similarity pair difference between cluster analysis, and are recorded as I', ZCD', TSD', ZXD' and J' respectively. The formula is established: Output scene matching degree MR, AA are both preset correction factors; and compare the scene matching degree MR with the preset scene matching threshold. If the scene matching degree MR is less than the preset scene matching threshold, the corresponding recognition scene is obtained, and the remaining image features are analyzed according to the corresponding recognition scene; if the scene matching degree MR is greater than or equal to the preset scene matching threshold, the best matching recognition scene is used as the corresponding recognition scene, and similarly, the remaining image features are analyzed according to the corresponding recognition scene;
[0065] S202: Analyze the remaining image features according to the corresponding recognition scene, specifically:
[0066] Scene features are extracted, and color features are extracted based on the color distribution of the scene (such as blue sky, green grass, etc.); different scenes may have different texture features (such as smooth roads in city streets and complex textures indoors); different objects and structures in the scene (such as buildings, roads, etc.) have different shape features, and extracting these features helps scene classification; edge detection algorithms (such as Canny edge detection) extract the outlines of objects in the scene, thereby providing a basis for scene recognition; the extracted features are matched with the feature library of known scenes, and the scene type is confirmed by calculating the similarity between the features; the extracted feature points include identifying key points in different scale spaces, calculating the main direction of each key point, and making it rotation invariant; the extracted image feature point set is {x1, x2,…, x n1}, and the feature point set of the known scene is {y1,y2,…,y m1}, by calculating the similarity between the two feature point descriptors; by formula: Euclidean distance d, where f i2 and f j1 They are the feature points x i2 and y j1 descriptor; obtain the feature similarity (Euclidean distance d) of each sample through feature matching;
[0067] Classify the scene: In scene classification, the extracted feature similarity is used as input. If the input is a data set {(x1,y1),(x2,y2),…,(x n1 ,y n1 )}, where x i2 is the characteristic vector of the sample, y i2 ∈{-1,+1} is the corresponding category label; then the hyperplane can be expressed as a linear equation: (w T x+b)=0, where w is the normal vector (determines the direction of the hyperplane) and b is the bias term; maximize the margin between categories. The margin refers to the distance between the hyperplane and the nearest sample point; the goal of SVM is to maximize the margin, that is, to keep the hyperplane as far away from the sample points in the data set as possible; in order to maximize the margin, SVM will select support vectors to determine the position of the hyperplane; support vectors are the sample points closest to the hyperplane and play a decisive role in the optimization process; the margin formula can be derived by the following steps: the margin on both sides of the hyperplane is calculated by the support vectors, and the margin formula is: The optimization goal of SVM is to maximize the margin; to achieve this, it is necessary to minimize ||w|| 2 (i.e., minimizing the square of the normal vector), since maximizing the margin is equivalent to minimizing ||w||; the objective function of SVM can be written as: It should be noted that: in order to simplify the subsequent calculation process (in fact, the optimization goal is to minimize Instead of ||w|| 2 itself, because the two are equivalent in the optimization process); in order to ensure correct classification, all sample points must be on the correct side of the hyperplane; specifically, for each sample x i2 , whose category label y i2 The following constraints must be met: Among them, x i2 is the eigenvector of the i2th sample, y i2 is a label (scene type); the objective function and constraints constitute a constrained optimization problem. To solve this problem, SVM uses the Lagrange multiplier method to convert it into a dual problem; the Lagrange function L is: where λ i2 is the Lagrange multiplier; by taking the derivative of this Lagrange function and setting it to zero, we can finally get the dual form of SVM; by solving the dual problem, we can get the optimal w and b; after getting the optimal hyperplane, we use it to classify new data points; for the new sample x, the classification decision is judged: y = sign (w T x+b), if w T x+b>0, it belongs to the positive class (y=+1), which is the corresponding scene for recognition; if w T x+b<0, belongs to the negative class (y=-1), and there is no corresponding scene;
[0068] S203: After the scene is confirmed, feature recognition analysis is performed:
[0069] S231: Analyze the spatial correlation of features:
[0070] The spatial position correlation coefficient is a measure of the spatial relationship between quantitative features and is used to evaluate the relative position between feature points. If there are two feature points P i3 (x i3 ,y i3) and P j2 (x j2 ,y j2 ), calculate the Euclidean distance D2 between them: Reflects the proximity between features; then, by calculating their relative position vector R i3j2 =(x j2 -x i3 ), (y j2 -y i3 ) and the angle To quantify their directional relationship, the spatial position correlation coefficient C i3j2 Taking these factors into consideration, the weighted formula is used:
[0071] Among them, a1, a2 and a3 are preset weight coefficients, a1+a2+a3=1, which are used to adjust the contribution of distance, angle and relative position to the correlation coefficient; if the spatial position correlation coefficient C i3j2 > spatial position association threshold, then it is determined to be a feature point P i3 and P j2 There is a strong spatial correlation. It should be noted that the weighted formula is a method for calculating the average value that takes into account the importance of different data. Each data is assigned a weight, and the larger the weight, the greater the impact of the data. By assigning different weights, the weighted formula can more accurately reflect the true impact of the data. The preset weight coefficient of the present invention can be determined by subjective allocation method, quantity or frequency ratio method, objective weighting method, etc.
[0072] S232: Analyze the functional requirements correlation of the features; there are two feature points P i3 and P j2 , and their corresponding functional requirements are F i3 and F j2 ; The relevance of functional requirements is measured based on their similarity; the similarity between functional requirements is usually obtained by calculating the difference in attribute values of features; for example, the matching degree M of functional requirements i3j2 It is expressed by a weighted difference formula: M i3j2 =b1×|F i3 -F j2 |+b2×||A i3 -A j2 ||, where F i3 and F j2 Represents the features P i3 and P j2 Functional requirements, A i3 and A j2 Represents their attribute values, b1 and b2 are preset weight coefficients used to adjust the impact of functional requirements and attribute values on similarity; functional requirement correlation coefficient G i3j2 By setting up the formula: If the functional requirement correlation coefficient G i3j2 >Functional requirement association threshold, then it is determined to be feature P i3 and P j2 There is a strong correlation in functional requirements;
[0073] S233: If the functional requirement correlation coefficient G i3j2 >Functional requirement correlation threshold and spatial position correlation coefficient C i3j2 >If the spatial position correlation threshold is met, the corresponding identification is performed; otherwise, it is manually identified.
[0074] Example 2:
[0075] See also Figure 2 As shown, the present invention provides an image recognition and classification method based on artificial intelligence, including: a data enhancement module, an image recognition and classification module and a field classification and function connection module;
[0076] The data augmentation module increases the diversity of the data by performing a series of augmentation operations on the image (such as rotation, scaling, cropping, flipping, etc.). These operations help the model be more robust under different shooting conditions and perspectives, thereby improving the accuracy and generalization ability of image classification tasks;
[0077] The image recognition and classification module is responsible for labeling and extracting features from the enhanced image, and analyzing the correlation between features using techniques such as cluster analysis, association rule analysis, and spatial pattern analysis. These methods can deeply explore the relationship between various features in the image, providing a more accurate basis for subsequent scene recognition and classification.
[0078] After matching image features, the field classification module uses classification algorithms such as support vector machines (SVM) to classify the image scene and further analyze the correlation between the spatial location of scene features and functional requirements. By calculating the similarity and spatial relationship between features, it can achieve precise scene recognition and feature labeling, ensuring that features in the image are accurately divided into functions and labeled.
[0079] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to specific embodiments. Obviously, many modifications and variations are possible based on the contents of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. An image recognition and classification method based on artificial intelligence, characterized in that: include: Step 1: Perform data enhancement on the image; Step 2: Identify and label the enhanced image data, specifically: Perform correlation analysis on the identified and annotated image features to obtain the scene matching degree; if the scene matching degree is less than the preset scene matching threshold, the corresponding identified scene is obtained, and the remaining image features are analyzed based on the corresponding identified scene; If the scene matching degree is greater than or equal to the preset scene matching threshold, the best matching recognition scene is used as the corresponding recognition scene, and the remaining image features are analyzed according to the corresponding recognition scene to obtain the Euclidean distance d; The feature similarity of each sample is obtained by feature matching; the scene is classified: in scene classification, the extracted feature similarity is used as input. If the input is a data set {(x1,y1),(x2,y2),…,(x n1 ,y n1 )},x i2 is the characteristic vector of the sample, y i2 ∈{-1,+1} is the corresponding category label; then the hyperplane is expressed as a linear equation: (w T x+b)=0, where w is the normal vector and b is the bias term; finally, the dual form of SVM is obtained; by solving the dual problem, the optimal w and b are obtained; the classification decision is made: y=sign(w T x+b), if w T x+b>0, it belongs to the positive class (y=+1), which is the corresponding scene for recognition; if w T x+b<0, belongs to the negative class (y=-1), and there is no corresponding scene; After the scene is confirmed, feature recognition analysis is performed; spatial position correlation analysis is performed on the features to obtain the spatial position correlation coefficient C i3j2 ; Perform functional requirement correlation analysis on the features to obtain the functional requirement correlation coefficient G i3j2 ; If the functional requirement correlation coefficient G i3j2 >Functional requirement correlation threshold and spatial position correlation coefficient C i3j2 >If the spatial position correlation threshold is met, the corresponding identification is performed; otherwise, it is manually identified.
2. The image recognition and classification method based on artificial intelligence according to claim 1, characterized in that: The specific process of performing data enhancement on the image is as follows: S101: Rotate the image: randomly select an angle and rotate the image; S102: scaling the image: simulating objects at different distances by changing the size of the image; S103: Cropping the image: Randomly cropping parts of the image, retaining the center of the image or a random area, focusing on different parts of the object, and enhancing the model's adaptability under different visual field conditions; S104: flip the image horizontally or vertically; S105: changing the brightness, contrast, and saturation of the image, and randomly adjusting the brightness, contrast, and saturation of the image to simulate different lighting conditions; S106: adding noise, adding a certain amount of random noise to the image; S107: Occluding the image: randomly occluding a portion of the image.
3. The image recognition and classification method based on artificial intelligence according to claim 1, characterized in that: The specific process of performing correlation analysis on the identified and annotated image features to obtain the scene matching degree is as follows: Group similar features into the same group; by formula: The output is to optimize the cluster division by minimizing the distance between the sample and the cluster center, J is the objective function; n is the number of samples, K is the number of clusters, x i is the i-th sample, μ k is the center of the kth cluster; ||(x i ∈C k ) is the indicator function; ||x i -μ k || 2 It is the square of the Euclidean distance between the sample and the cluster center; the image features are clustered by K-means to obtain similar groups between features; Discover frequent association patterns between features, and calculate the support, confidence, and lift formulas: Support: Output the frequency ZCD(X) of a specific feature combination X in all samples, where TZ(X) is the number of times feature combination X appears in the data, and N is the total number of samples in the dataset; Confidence: Lift: Spatial pattern analysis, using the formula: Output Moran index I, N1 is the number of samples, W is the sum of the weight matrix; ω i1j are the elements of the spatial weight matrix; x i1 ,x j are the eigenvalues of the i1-th and j-th samples, is the mean of the feature; The Moran index, support, lift, confidence and similarity between the correlation analysis and cluster analysis are matched in the image tag scene library, and the range comparison is performed with the Moran index, support, lift, confidence and similarity between the corresponding scenes in the scene library, and the absolute difference between the range comparisons is calculated to obtain the Moran index pair difference, support absolute difference, lift pair difference, confidence pair difference and similarity pair difference between cluster analysis, and are recorded as I', ZCD', TSD', ZXD' and J' respectively. The formula is established: The output scene matching degrees MR and AA are both preset correction factors.
4. The image recognition and classification method based on artificial intelligence according to claim 3, characterized in that: The specific process of analyzing the remaining image features corresponding to the recognition scene to obtain the Euclidean distance d is: Extract scene features and extract color features based on the color distribution of the scene; different scenes may have different texture features; different objects and structures in the scene have different shape features, and extracting these features helps to classify the scene; the edge detection algorithm extracts the outline of the object in the scene, which provides a basis for scene recognition; the extracted features are matched with the feature library of known scenes, and the scene type is confirmed by calculating the similarity between the features; the extracted feature points, including the key points identified in different scale spaces, calculate the main direction of each key point, and make it rotation invariant; if the extracted image feature point set is {x1,x2,…,x n1 }, and the feature point set of the known scene is {y1,y2,…,y m1 }, by calculating the similarity between the two feature point descriptors; by formula: Euclidean distance d, where f i2 and f j1 They are the feature points x i2 and y j1 Descriptor of .
5. The image recognition and classification method based on artificial intelligence according to claim 4, characterized in that: The specific process of classifying the scenes is as follows: In scene classification, the extracted feature similarity is used as input. If the input is a data set {(x1,y1),(x2,y2),…,(x n1 ,y n1 )}; The goal of SVM is to maximize the interval, and the interval formula is derived through steps: The interval formula is: To achieve this, we need to minimize ||w|| 2 , because maximizing the margin is equivalent to minimizing ||w||; the objective function of SVM can be written as: For each sample x i2 , whose category label y i2 The following constraints must be met: x i2 is the feature vector of the i2th sample, y i2 is a label; the objective function and constraints constitute a constrained optimization problem. To solve this problem, SVM uses the Lagrange multiplier method to convert it into a dual problem; the Lagrange function L is: λ i2 is the Lagrange multiplier; by taking the derivative of this Lagrange function and setting it to zero, we can finally get the dual form of SVM; by solving the dual problem, we can get the optimal w and b.
6. The image recognition and classification method based on artificial intelligence according to claim 5, characterized in that: The spatial position correlation coefficient C is obtained by performing spatial position correlation analysis on the features. i3j2 The specific process is: If there are two feature points P i3 (x i3 ,y i3) and P j2 (x j2 ,y j2 ), calculate the Euclidean distance D2 between them: By calculating their relative position vector R i3j2 =(x j2 -x i3 ), (y j2 -y i3 ) and the angle Then the spatial position correlation coefficient C i3j2 , expressed using the weighted formula: a1, a2, and a3 are preset weight coefficients.
7. The image recognition and classification method based on artificial intelligence according to claim 5, characterized in that: The functional requirement correlation coefficient G is obtained by performing functional requirement correlation analysis on the features. i3j2 The specific process is: There are two feature points P i3 and P j2 , the corresponding functional requirements are F i3 and F j2 ;Matching degree of functional requirements i3j2 It is expressed by a weighted difference formula: M i3j2 =b1×|F i3 -F j2 |+b2×||A i3 -A j2 ||,F i3 and F j2 Represents the features P i3 and P j2 Functional requirements, A i3 and A j2 represents their attribute values, b1 and b2 are preset weight coefficients; Functional requirement correlation coefficient G i3j2 By setting up the formula:
8. An image recognition and classification system based on artificial intelligence, characterized in that: Applied to implement the artificial intelligence-based image recognition and classification method according to any one of claims 1 to 7, the system comprises: Data enhancement module, image recognition module and field classification module; The data enhancement module performs a series of enhancement operations on the image; The image recognition and classification module is responsible for labeling and feature extraction of the enhanced image, and uses cluster analysis, association rule analysis, and spatial pattern analysis techniques to analyze the correlation between features; After matching image features, the field classification module classifies the image into scenes and further analyzes the correlation between the spatial position of the scene features and the functional requirements.
Citation Information
Patent Citations
Scene recognition method, recognition equipment and terminal equipment
CN109977731A
Method for identifying special scenes, objects, figures and noise factors in video
CN113191205A
Multi-modal fine-grained scene recognition method based on deep learning
CN117095274A
Intelligent classification method for high-resolution remote sensing image artificial structure building scene
CN117876878A
Building construction potential safety hazard management method and system
CN119250548A