An AI image detection method and system integrating scene metadata

By integrating scene metadata into an AI image detection method, and utilizing the YOLO architecture and random forest algorithm to assist in the judgment model, dual verification and dynamic optimization of detection results are achieved. This solves the problems of detection accuracy and efficiency of deep learning models in complex scenes, adapts to complex scenes, and reduces human intervention.

CN122135004APending Publication Date: 2026-06-02FUJIAN WANFU INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUJIAN WANFU INFORMATION TECH CO LTD
Filing Date
2026-01-16
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing deep learning models face problems in image detection, such as insufficient training data, inability to handle complex scenes, high computational complexity, and the need for manual intervention, resulting in low detection accuracy and efficiency.

Method used

By integrating scene metadata into an AI image detection method, and using the YOLO architecture target detection model combined with the random forest algorithm to assist in the judgment model, a metadata feature acquisition system is constructed to achieve dual verification and dynamic optimization of detection results, thereby reducing manual intervention.

Benefits of technology

It improves the accuracy and robustness of image detection, adapts to complex scenarios, reduces manual workload, and supports edge computing deployment and multi-scenario expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135004A_ABST
    Figure CN122135004A_ABST
Patent Text Reader

Abstract

This invention provides an AI image detection method and system that integrates scene metadata in the field of target detection technology. The method includes: Step S1, training a target detection model using a preset image dataset, manually judging the detection results of the target detection model to obtain a manual judgment result, and constructing a structured target information dataset based on the detection results and the manual judgment result; Step S2, constructing a metadata feature acquisition system to acquire metadata features from the image dataset; Step S3, training an auxiliary judgment model by combining the target information dataset and the metadata features; Step S4, constructing a model workflow system to call the target detection model to detect the image to be detected, obtaining real-time detection results, and calling the auxiliary judgment model to judge the real-time detection results. The advantages of this invention are: it greatly improves the accuracy of image detection and greatly reduces the amount of manual work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology, and in particular to an AI image detection method and system that integrates scene metadata. Background Technology

[0002] Image detection is a computer vision technique used to identify, locate, and analyze specific objects, features, or patterns from images. Traditionally, object detection and semantic segmentation algorithms for image detection rely on deep learning models, such as YOLO, SSD, and Faster R-CNN. While these deep learning models perform well in specific scenarios, they face the following challenges in practical applications: 1. Insufficient or biased training data: The dataset cannot cover the diversity of all scenarios, resulting in poor generalization ability of traditional deep learning models in complex or novel scenarios; for example, the lack of data on nighttime or inclement weather conditions may cause deep learning models to fail in nighttime or inclement weather conditions.

[0003] 2. Inability to handle complex scenarios: Factors such as changes in lighting, weather conditions (such as rain, fog, and snow), and occlusion can significantly affect detection accuracy; for example, complex scenarios may reduce the accuracy of single-stage detectors (such as YOLO).

[0004] 3. Computational complexity: Real-time applications require deep learning models to have both high accuracy and low latency, but this is often difficult to balance; for example, YOLOv7 runs at 3.5ms / frame on the MS COCO dataset, but still needs to be optimized to adapt to edge devices.

[0005] 4. Requires manual intervention: Due to the poor detection performance of deep learning models, manual review is still required in critical applications (such as security and medical care), which increases time and cost.

[0006] Therefore, how to provide an AI image detection method and system that integrates scene metadata to improve the accuracy of image detection and reduce manual workload has become an urgent technical problem to be solved. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to provide an AI image detection method and system that integrates scene metadata, thereby improving the accuracy of image detection and reducing manual workload.

[0008] In a first aspect, the present invention provides an AI image detection method that integrates scene metadata, comprising the following steps: Step S1: Train a target detection model using a preset image dataset to output target category, target bounding box position, target bounding box size, bounding box aspect ratio, and confidence score. Manually evaluate the detection results of the target detection model to obtain the manual evaluation results. Construct a structured target information dataset based on the detection results and the manual evaluation results. Step S2: Construct a metadata feature acquisition system based on the spatiotemporal reference alignment module, environmental state perception module, scene semantic perception module, and imaging quality perception module, and acquire metadata features from the image dataset through the metadata feature acquisition system; Step S3: Train an auxiliary judgment model by combining the target information dataset and metadata features; Step S4: Construct a model workflow system, call the target detection model through the model workflow system to detect the image to be detected, obtain real-time detection results, and then call the auxiliary judgment model to judge the real-time detection results.

[0009] Furthermore, in step S1, the target detection model is based on the YOLO architecture; the manual evaluation results are used to verify the detection results and correct the annotations of the image dataset.

[0010] Furthermore, in step S2, the metadata features include at least time features, meteorological features, scene features, and image metadata features; The spatiotemporal reference alignment module is used to automatically establish a temporal mapping relationship between image data and target detection results, and extract timestamp information; The environmental state perception module is used to fuse multi-source meteorological data interfaces to obtain the meteorological environmental state in the image; The scene semantic perception module is used to combine the device topology map with visual feature embedding to generate a semantic description of the scene type; The imaging quality perception module is used to acquire the spatial pose parameters of the camera and image quality indicators. The metadata feature acquisition system supports the acquisition, synchronization, standardization, parsing, storage, and feature engineering of metadata features. It also supports data caching, anomaly monitoring, and log auditing, and is linked with the image acquisition system through task scheduling and event triggers. The standardization process includes at least discretization, numerical encoding, and missing data filling.

[0011] Furthermore, in step S3, the auxiliary judgment model is constructed based on the random forest algorithm; The training process of the auxiliary judgment model is as follows: the target information dataset and metadata features are divided into a training set, a validation set and a test set. The auxiliary judgment model is trained using the training set. During the training process, the hyperparameters of the auxiliary judgment model are continuously optimized. The trained auxiliary judgment model is validated and tested using the validation set and the test set.

[0012] Furthermore, step S4 specifically includes: A model workflow system is constructed. The model workflow system calls the target detection model to detect the image to be inspected, and obtains real-time detection results carrying the target category, target bounding box position, target image area and confidence level. Then, the metadata feature acquisition system is called to collect real-time metadata features from the image to be inspected. The real-time detection results and real-time metadata features are input into the auxiliary judgment model for judgment, and the judgment result of the image to be inspected carrying the confidence level or the non-confidence level is output.

[0013] Secondly, this invention provides an AI image detection system that integrates scene metadata, comprising the following modules: The target detection model training module is used to train a target detection model that outputs target category, target bounding box position, target bounding box size, bounding box aspect ratio, and confidence score using a preset image dataset. The detection results of the target detection model are manually evaluated to obtain the human evaluation results. A structured target information dataset is constructed based on the detection results and the human evaluation results. The metadata feature acquisition system construction module is used to construct a metadata feature acquisition system based on the spatiotemporal reference alignment module, the environmental state perception module, the scene semantic perception module, and the imaging quality perception module, and to acquire metadata features from the image dataset through the metadata feature acquisition system. The auxiliary judgment model training module is used to train an auxiliary judgment model by combining the target information dataset and metadata features. The AI ​​image detection module is used to build a model workflow system. The model workflow system calls the target detection model to detect the image to be detected, obtains the real-time detection results, and then calls the auxiliary judgment model to judge the real-time detection results.

[0014] Furthermore, in the target detection model training module, the target detection model is based on the YOLO architecture; the manual evaluation results are used to verify the detection results and correct the annotations of the image dataset.

[0015] Furthermore, in the metadata feature acquisition system construction module, the metadata features include at least time features, meteorological features, scene features, and image metadata features; The spatiotemporal reference alignment module is used to automatically establish a temporal mapping relationship between image data and target detection results, and extract timestamp information; The environmental state perception module is used to fuse multi-source meteorological data interfaces to obtain the meteorological environmental state in the image; The scene semantic perception module is used to combine the device topology map with visual feature embedding to generate a semantic description of the scene type; The imaging quality perception module is used to acquire the spatial pose parameters of the camera and image quality indicators. The metadata feature acquisition system supports the acquisition, synchronization, standardization, parsing, storage, and feature engineering of metadata features. It also supports data caching, anomaly monitoring, and log auditing, and is linked with the image acquisition system through task scheduling and event triggers. The standardization process includes at least discretization, numerical encoding, and missing data filling.

[0016] Furthermore, in the auxiliary judgment model training module, the auxiliary judgment model is constructed based on the random forest algorithm; The training process of the auxiliary judgment model is as follows: the target information dataset and metadata features are divided into a training set, a validation set and a test set. The auxiliary judgment model is trained using the training set. During the training process, the hyperparameters of the auxiliary judgment model are continuously optimized. The trained auxiliary judgment model is validated and tested using the validation set and the test set.

[0017] Furthermore, the AI ​​image detection module is specifically used for: A model workflow system is constructed. The model workflow system calls the target detection model to detect the image to be inspected, and obtains real-time detection results carrying the target category, target bounding box position, target image area and confidence level. Then, the metadata feature acquisition system is called to collect real-time metadata features from the image to be inspected. The real-time detection results and real-time metadata features are input into the auxiliary judgment model for judgment, and the judgment result of the image to be inspected carrying the confidence level or the non-confidence level is output.

[0018] The advantages of this invention are: 1. A target detection model is trained using a pre-set image dataset to output target category, target bounding box position, target bounding box size, bounding box aspect ratio, and confidence score. The detection results of the target detection model are manually evaluated to obtain human evaluation results. A structured target information dataset is constructed based on the detection results and the human evaluation results. Then, a metadata feature acquisition system is constructed based on a spatiotemporal reference alignment module, an environmental state perception module, a scene semantic perception module, and an imaging quality perception module. Metadata features are collected from the image dataset through the metadata feature acquisition system. Next, an auxiliary evaluation model is trained by combining the target information dataset and metadata features. The target detection model is called through the model workflow system to detect the image to be detected to obtain real-time detection results. The auxiliary evaluation model is then called to evaluate the real-time detection results. That is, the detection results output by the target detection model are evaluated by the pre-trained auxiliary evaluation model, and the target detection model is dynamically optimized based on the evaluation results to continuously improve the detection accuracy of the target detection model. No manual intervention is required, it can adapt to complex and novel scenes, and the model structure is simple, thus greatly improving the accuracy of image detection and greatly reducing the workload of manual labor.

[0019] 2. By integrating scene metadata (time features, meteorological features, scene features, and image metadata features) with AI image detection results to construct a dual verification mechanism, this system innovatively combines the output of target detection models (such as YOLO) with manually labeled data and random forest-assisted models to form a dynamic closed-loop optimization system. Its advantages include: 1) Utilizing external environmental metadata to compensate for the limitations of pure visual models, significantly improving the robustness of detection in complex scenes (such as rainy / foggy weather, nighttime); 2) Enhancing the credibility and interpretability of results through manual review and iterative model optimization using structured datasets; 3) Modular design (metadata acquisition system, model workflow system) enables efficient collaboration in the detection-judgment process, supporting edge computing deployment and multi-scenario expansion; 4) Standardized data processing and anomaly monitoring mechanisms ensure system stability, while open third-party interfaces provide technical compatibility for cross-domain applications, combining technological innovation with engineering practicality. Attached Figure Description

[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0021] Figure 1 This is a flowchart of an AI image detection method that integrates scene metadata according to the present invention.

[0022] Figure 2 This is a schematic diagram of the structure of an AI image detection system that integrates scene metadata according to the present invention. Detailed Implementation

[0023] The technical solution in this application embodiment has the following general idea: the detection results output by the target detection model are evaluated by a pre-trained auxiliary evaluation model, and the target detection model is dynamically optimized based on the evaluation results to continuously improve the detection accuracy of the target detection model. No manual intervention is required, it can adapt to complex and novel scenarios, and the model structure is simple, thereby greatly improving the accuracy of image detection and greatly reducing the amount of manual work.

[0024] Please refer to Figures 1 to 2 As shown, a preferred embodiment of the AI ​​image detection method integrating scene metadata of the present invention includes the following steps: Step S1: Train a target detection model using a preset image dataset to output target category, target bounding box position, target bounding box size, bounding box aspect ratio, and confidence score. Manually evaluate the detection results of the target detection model to obtain the manual evaluation result (i.e., evaluate whether the output is correct, 1 indicates correct, 0 indicates incorrect). Construct a structured target information dataset based on the detection results and the manual evaluation result. Step S2: Construct a metadata feature acquisition system based on the spatiotemporal reference alignment module, environmental state perception module, scene semantic perception module, and imaging quality perception module, and acquire metadata features from the image dataset through the metadata feature acquisition system; Step S3: Train an auxiliary judgment model by combining the target information dataset and metadata features; Step S4: Construct a model workflow system, call the target detection model through the model workflow system to detect the image to be detected, obtain real-time detection results, and then call the auxiliary judgment model to judge the real-time detection results.

[0025] In step S1, the target detection model is based on the YOLO architecture; the manual evaluation results are used to verify the detection results and correct the annotations of the image dataset.

[0026] Based on existing image datasets, an object detection model is trained using the YOLO architecture, with a balance between accuracy and performance selected according to the specific application scenario. After training, the object detection model is used to detect objects in sample images, outputting detection results including object category, object bounding box location, object image area, and confidence score. Subsequently, a manual review mechanism is introduced to verify and correct the detection results, ensuring data accuracy. The manual review results and the object detection model's output are recorded together, serving as the data foundation for subsequent model optimization and auxiliary model training. The key to this stage is to form a high-quality, structured object information dataset to support subsequent judgment and decision-making tasks.

[0027] In the step S2, the metadata features at least include time features, meteorological features, scene features, and image metadata features; the metadata features also include image quality, lighting conditions, target distance, scene range, target type, and environmental factors; The corresponding content and feature extraction methods of the metadata features are shown in the following table:

[0028] The spatio-temporal reference alignment module is used to automatically establish the time mapping relationship between the image data and the target detection result and extract the timestamp information; The environmental state perception module is used to fuse multi-source meteorological data interfaces (including third-party APIs and Internet of Things sensors) to obtain the meteorological environmental state in the image; The scene semantic perception module is used to generate the semantic description of the scene type by combining the device topology map and visual feature embedding; The imaging quality perception module is used to obtain the spatial pose parameters and image quality indexes of the camera; The metadata feature acquisition system supports the acquisition, synchronization, standardized processing, parsing, storage, and feature engineering of metadata features, and also supports data caching, exception monitoring, and log auditing, and is linked with the image acquisition system through task scheduling and event triggers; the standardized processing at least includes discretization, numerical coding, and missing value filling.

[0029] To achieve context enhancement and automated research and judgment support in the image analysis process, an automated non-image information acquisition and processing system (metadata feature acquisition system) is constructed, which has the capabilities of metadata synchronization, parsing, storage, and feature engineering. The metadata feature acquisition system realizes the automatic extraction and structured coding of key non-image information by integrating a time synchronization module (automatically extracting the timestamp information of image files or video streams), a weather interface service module (accessing third-party meteorological APIs to obtain the weather status at the time of shooting in real time), a scene recognition module (automatically inferring the shooting scene type by combining the image source number and the device location database), etc.

[0030] The metadata feature acquisition system is designed with an unattended automated operation mechanism, and is linked with the image acquisition system through task scheduling and event triggers. The collected metadata is subjected to standardized processing (such as discretization, numerical coding, missing value filling, etc.) to form a feature input in a unified format for subsequent auxiliary research and judgment model training and prediction analysis. The metadata feature acquisition system is also equipped with data caching, exception monitoring, and log auditing functions to ensure long-term stable operation and facilitate traceability analysis. The introduction of the metadata feature acquisition system significantly reduces the frequency of manual participation, realizes the deep integration of image data and environmental context, and is an important infrastructure for intelligent auxiliary judgment.

[0031] In step S3, the auxiliary judgment model is constructed based on the Random Forest Classifier algorithm; Random forest is an ensemble learning method suitable for handling high-dimensional, mixed-type feature data (such as numerical time and categorical weather). It can effectively handle both numerical and categorical features and provides feature importance analysis, with the following advantages: Robustness: Reduces overfitting through random subsampling and feature selection; Interpretability: Provides feature importance scores, revealing which factors (such as illumination and weather) have the greatest impact on detection accuracy; Efficiency: Suitable for small to medium-sized datasets, with fast training and prediction speeds.

[0032] The following is a code example of a random forest implementation: from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score # X is the feature matrix, y is the label X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) model = RandomForestClassifier(n_estimators=100, max_depth=10,random_state=42) model.fit(X_train, y_train) y_pred = model.predict(X_test) print("Accuracy:", accuracy_score(y_test, y_pred)) Each decision tree in a random forest selects the optimal feature and split point by minimizing the Gini impurity: [ Gini(D) = 1 - \sum_{k=1}^{K} p_k^2 ] • Derivation: Gini impurity measures the purity of the class within a node. The highest purity (all samples belong to the same class) is (Gini(D) = 0); the lowest purity (classes are uniformly distributed) is (Gini(D) = 1 - 1 / K). For a binary classification problem (K=2), if the proportions of correct and incorrect samples are (p_1) and (p_2 = 1 - p_1) respectively, then: [ Gini(D) = 1 - p_1^2 - (1 - p_1)^2 = 2p_1(1 - p_1) ] During splitting, select the features and threshold that minimize the weighted Gini impurity: [ Gini{\text{split}}=\frac{|D{\text{left}}|}{|D|} Gini(D{\text{left}})+\frac{|D{\text{right}}|}{|D|} Gini(D_{\text{right}}) ] Random Forest Prediction Random forests use a majority vote by ensemble the predictions of (T) decision trees: [ \hat{Y} = \text{argmax}k \sum{t=1}^{T} I(h_t(X) = k) ] Derivation: Each tree (h_t) is trained on a random subset, and the prediction result is a class (k) (correct or incorrect). Majority voting selects the class with the highest frequency by statistically analyzing the predictions of all trees. The probability estimate can be calculated using the voting proportions. [ P(Y=1|X) = \frac{1}{T} \sum_{t=1}^{T} I(h_t(X) = 1) ] In the above algorithm, `n_estimators` and `max_depth` are hyperparameters, whose values ​​are set based on our experience and pre-introduced into the model. During implementation, these hyperparameters can be optimized, meaning finding an optimal combination of parameters to improve the model's accuracy, generalization ability, and stability, avoiding underfitting or overfitting due to insufficient human experience, thereby maximizing the model's performance. The code for hyperparameter optimization is as follows: from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import cross_val_score, train_test_split from bayes_opt import BayesianOptimization from sklearn.metrics import accuracy_score import numpy as np # Split into training and test sets X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) # Define the objective function to return the average accuracy of cross-validation. def rf_cv(n_estimators, max_depth, min_samples_split): n_estimators = int(n_estimators) max_depth = int(max_depth) min_samples_split = int(min_samples_split) model = RandomForestClassifier( n_estimators=n_estimators, max_depth=max_depth, min_samples_split=min_samples_split, random_state=42, n_jobs=-1 ) # Use cross-validation scores as the optimization objective (using the training set) scores = cross_val_score(model, X_train, y_train, cv=3, scoring='accuracy') return scores.mean() # Define the search space pbounds = { 'n_estimators': (50, 200), 'max_depth': (5, 30), 'min_samples_split': (2, 10) } # Create optimizer optimizer = BayesianOptimization( f=rf_cv, pbounds=pbounds, random_state=42, verbose=2 ) # Execution optimization optimizer.maximize( init_points=5, # Initial number of random search points n_iter=15 # Number of iterations ) # Obtaining the optimal hyperparameters best_params = optimizer.max['params'] best_params['n_estimators'] = int(best_params['n_estimators']) best_params['max_depth'] = int(best_params['max_depth']) best_params['min_samples_split']= int(best_params['min_samples_split']) print("Best Parameters:", best_params) # Retrain the model using optimal parameters best_model=RandomForestClassifier(**best_params, random_state=42) best_model.fit(X_train, y_train) y_pred = best_model.predict(X_test) print("Optimized Accuracy:", accuracy_score(y_test, y_pred)) The training process of the auxiliary judgment model is as follows: the target information dataset and metadata features are divided into a training set, a validation set and a test set. The auxiliary judgment model is trained using the training set. During the training process, the hyperparameters of the auxiliary judgment model are continuously optimized. The trained auxiliary judgment model is validated and tested using the validation set and the test set.

[0033] The goal of the auxiliary judgment model is to determine whether a given object detection is a valid identification. Input features include the object detection output and metadata; the output is a "valid" or "invalid" label, or a probability-based validity score. This auxiliary judgment model acts as a second line of defense, effectively filtering out abnormal detection results and improving the overall system's practicality and intelligence.

[0034] Step S4 specifically involves: A model workflow system is constructed. The model workflow system calls the target detection model to detect the image to be inspected, and obtains real-time detection results carrying the target category, target bounding box position, target image area and confidence level. Then, the metadata feature acquisition system is called to collect real-time metadata features from the image to be inspected. The real-time detection results and real-time metadata features are input into the auxiliary judgment model for judgment, and the judgment result of the image to be inspected carrying the confidence level or the non-confidence level is output.

[0035] This system implements an end-to-end automated image processing and evaluation workflow, integrating a target detection model, a metadata feature acquisition system, and an auxiliary evaluation model. First, target detection is performed on the image, extracting features such as target category, confidence level, and location. Then, relevant metadata about the image capture is automatically acquired and input along with the detection results into the auxiliary evaluation model. The auxiliary evaluation model assesses the validity of the target recognition results, outputting whether the detection result is accepted or marked as requiring manual review. The entire process is automated, supporting both batch processing and real-time response scenarios. This automated workflow enables reliable evaluation of image detection results, effectively reducing false positives and false negatives, and alleviating the burden of manual review. A preferred embodiment of the AI ​​image detection system integrating scene metadata of the present invention includes the following modules: The target detection model training module is used to train a target detection model using a preset image dataset to output the target category, target bounding box position, target bounding box size, bounding box aspect ratio, and confidence score. The detection results of the target detection model are manually evaluated to obtain the manual evaluation result (i.e., whether the output is correct, 1 indicates correct and 0 indicates incorrect). Based on the detection results and the manual evaluation result, a structured target information dataset is constructed. The metadata feature acquisition system construction module is used to construct a metadata feature acquisition system based on the spatiotemporal reference alignment module, the environmental state perception module, the scene semantic perception module, and the imaging quality perception module, and to acquire metadata features from the image dataset through the metadata feature acquisition system. The auxiliary judgment model training module is used to train an auxiliary judgment model by combining the target information dataset and metadata features. The AI ​​image detection module is used to build a model workflow system. The model workflow system calls the target detection model to detect the image to be detected, obtains the real-time detection results, and then calls the auxiliary judgment model to judge the real-time detection results.

[0036] In the target detection model training module, the target detection model is based on the YOLO architecture; the manual evaluation results are used to verify the detection results and correct the annotations of the image dataset.

[0037] Based on existing image datasets, an object detection model is trained using the YOLO architecture, with a balance between accuracy and performance selected according to the specific application scenario. After training, the object detection model is used to detect objects in sample images, outputting detection results including object category, object bounding box location, object image area, and confidence score. Subsequently, a manual review mechanism is introduced to verify and correct the detection results, ensuring data accuracy. The manual review results and the object detection model's output are recorded together, serving as the data foundation for subsequent model optimization and auxiliary model training. The key to this stage is to form a high-quality, structured object information dataset to support subsequent judgment and decision-making tasks.

[0038] In the metadata feature acquisition system construction module, the metadata features include at least time features, meteorological features, scene features, and image metadata features; the metadata features also include image quality, lighting conditions, target distance, scene range, target type, and environmental factors; The content corresponding to the metadata features and the feature extraction methods are shown in the table below:

[0039] The spatio-temporal reference alignment module is used to automatically establish the time mapping relationship between image data and target detection results and extract timestamp information; The environmental state perception module is used to fuse multi-source meteorological data interfaces (including third-party APIs and Internet of Things sensors) to obtain the meteorological environmental state in the image; The scene semantic perception module is used to generate semantic descriptions of scene types by combining device topology maps and visual feature embeddings; The imaging quality perception module is used to obtain the spatial pose parameters and image quality indicators of the camera; The metadata feature acquisition system supports the acquisition, synchronization, standardized processing, parsing, storage, and feature engineering of metadata features, and also supports data caching, anomaly monitoring, and log auditing, and is linked with the image acquisition system through task scheduling and event triggers; The standardized processing at least includes discretization, numerical encoding, and missing value filling.

[0040] To achieve context enhancement and automated research and judgment support in the image analysis process, an automated non-image information acquisition and processing system (metadata feature acquisition system) is constructed, which has capabilities such as metadata synchronization, parsing, storage, and feature engineering. The metadata feature acquisition system realizes the automatic extraction and structured encoding of key non-image information by integrating a time synchronization module (automatically extracting the timestamp information of image files or video streams), a weather interface service module (accessing third-party meteorological APIs to obtain the weather state at the time of shooting in real time), a scene recognition module (automatically inferring the shooting scene type by combining the image source number and the device location database), etc.

[0041] The metadata feature acquisition system is designed with an unattended automated operation mechanism and is linked with the image acquisition system through task scheduling and event triggers. The collected metadata is subjected to standardized processing (such as discretization, numerical encoding, missing value filling, etc.) to form a feature input in a unified format for subsequent auxiliary research and judgment model training and prediction analysis. The metadata feature acquisition system is also equipped with data caching, anomaly monitoring, and log auditing functions to ensure long-term stable operation and facilitate traceability analysis. The introduction of the metadata feature acquisition system significantly reduces the frequency of manual participation, realizes the deep integration of image data and environmental context, and is an important infrastructure for intelligent auxiliary judgment.

[0042] In the auxiliary research and judgment model training module, the auxiliary research and judgment model is constructed based on the Random Forest algorithm (RandomForest Classifier); Random forest is an ensemble learning method suitable for handling high-dimensional, mixed-type feature data (such as numerical time and categorical weather). It can effectively handle both numerical and categorical features and provides feature importance analysis, with the following advantages: Robustness: Reduces overfitting through random subsampling and feature selection; Interpretability: Provides feature importance scores, revealing which factors (such as illumination and weather) have the greatest impact on detection accuracy; Efficiency: Suitable for small to medium-sized datasets, with fast training and prediction speeds.

[0043] The following is a code example of a random forest implementation: from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score # X is the feature matrix, y is the label X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) model = RandomForestClassifier(n_estimators=100, max_depth=10,random_state=42) model.fit(X_train, y_train) y_pred = model.predict(X_test) print("Accuracy:", accuracy_score(y_test, y_pred)) Each decision tree in a random forest selects the optimal feature and split point by minimizing the Gini impurity: [ Gini(D) = 1 - \sum_{k=1}^{K} p_k^2 ] • Derivation: Gini impurity measures the purity of the class within a node. The highest purity (all samples belong to the same class) is (Gini(D) = 0); the lowest purity (classes are uniformly distributed) is (Gini(D) = 1 - 1 / K). For a binary classification problem (K=2), if the proportions of correct and incorrect samples are (p_1) and (p_2 = 1 - p_1) respectively, then: [ Gini(D) = 1 - p_1^2 - (1 - p_1)^2 = 2p_1(1 - p_1) ] During splitting, select the features and threshold that minimize the weighted Gini impurity: [ Gini{\text{split}}=\frac{|D{\text{left}}|}{|D|} Gini(D{\text{left}})+\frac{|D{\text{right}}|}{|D|} Gini(D_{\text{right}}) ] Random Forest Prediction Random forests use a majority vote by ensemble the predictions of (T) decision trees: [ \hat{Y} = \text{argmax}k \sum{t=1}^{T} I(h_t(X) = k) ] Derivation: Each tree (h_t) is trained on a random subset, and the prediction result is a class (k) (correct or incorrect). Majority voting selects the class with the highest frequency by statistically analyzing the predictions of all trees. The probability estimate can be calculated using the voting proportions. [ P(Y=1|X) = \frac{1}{T} \sum_{t=1}^{T} I(h_t(X) = 1) ] In the above algorithm, `n_estimators` and `max_depth` are hyperparameters, whose values ​​are set based on our experience and pre-introduced into the model. During implementation, these hyperparameters can be optimized, meaning finding an optimal combination of parameters to improve the model's accuracy, generalization ability, and stability, avoiding underfitting or overfitting due to insufficient human experience, thereby maximizing the model's performance. The code for hyperparameter optimization is as follows: from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import cross_val_score, train_test_split from bayes_opt import BayesianOptimization from sklearn.metrics import accuracy_score import numpy as np # Split into training and test sets X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) # Define the objective function to return the average accuracy of cross-validation. def rf_cv(n_estimators, max_depth, min_samples_split): n_estimators = int(n_estimators) max_depth = int(max_depth) min_samples_split = int(min_samples_split) model = RandomForestClassifier( n_estimators=n_estimators, max_depth=max_depth, min_samples_split=min_samples_split, random_state=42, n_jobs=-1 ) # Use cross-validation scores as the optimization objective (using the training set) scores = cross_val_score(model, X_train, y_train, cv=3, scoring='accuracy') return scores.mean() # Define the search space pbounds = { 'n_estimators': (50, 200), 'max_depth': (5, 30), 'min_samples_split': (2, 10) } # Create optimizer optimizer = BayesianOptimization( f=rf_cv, pbounds=pbounds, random_state=42, verbose=2 ) # Execution optimization optimizer.maximize( init_points=5, # Initial number of random search points n_iter=15 # Number of iterations ) # Obtaining the optimal hyperparameters best_params = optimizer.max['params'] best_params['n_estimators'] = int(best_params['n_estimators']) best_params['max_depth'] = int(best_params['max_depth']) best_params['min_samples_split']= int(best_params['min_samples_split']) print("Best Parameters:", best_params) # Retrain the model using optimal parameters best_model=RandomForestClassifier(**best_params, random_state=42) best_model.fit(X_train, y_train) y_pred = best_model.predict(X_test) print("Optimized Accuracy:", accuracy_score(y_test, y_pred)) The training process of the auxiliary judgment model is as follows: the target information dataset and metadata features are divided into a training set, a validation set and a test set. The auxiliary judgment model is trained using the training set. During the training process, the hyperparameters of the auxiliary judgment model are continuously optimized. The trained auxiliary judgment model is validated and tested using the validation set and the test set.

[0044] The goal of the auxiliary judgment model is to determine whether a given object detection is a valid identification. Input features include the object detection output and metadata; the output is a "valid" or "invalid" label, or a probability-based validity score. This auxiliary judgment model acts as a second line of defense, effectively filtering out abnormal detection results and improving the overall system's practicality and intelligence.

[0045] The AI ​​image detection module is specifically used for: A model workflow system is constructed. The model workflow system calls the target detection model to detect the image to be inspected, and obtains real-time detection results carrying the target category, target bounding box position, target image area and confidence level. Then, the metadata feature acquisition system is called to collect real-time metadata features from the image to be inspected. The real-time detection results and real-time metadata features are input into the auxiliary judgment model for judgment, and the judgment result of the image to be inspected carrying the confidence level or the non-confidence level is output.

[0046] This system implements an end-to-end automated image processing and evaluation workflow, integrating a target detection model, a metadata feature acquisition system, and an auxiliary evaluation model. First, target detection is performed on the image, extracting features such as target category, confidence level, and location. Then, relevant metadata about the image capture is automatically acquired and input along with the detection results into the auxiliary evaluation model. The auxiliary evaluation model assesses the validity of the target recognition results, outputting whether the detection result is accepted or marked as requiring manual review. The entire process is automated, supporting both batch processing and real-time response scenarios. This automated workflow enables reliable evaluation of image detection results, effectively reducing false positives and false negatives, and alleviating the burden of manual review.

[0047] In summary, the advantages of this invention are as follows: 1. A target detection model is trained using a pre-set image dataset to output target category, target bounding box position, target bounding box size, bounding box aspect ratio, and confidence score. The detection results of the target detection model are manually evaluated to obtain human evaluation results. A structured target information dataset is constructed based on the detection results and the human evaluation results. Then, a metadata feature acquisition system is constructed based on a spatiotemporal reference alignment module, an environmental state perception module, a scene semantic perception module, and an imaging quality perception module. Metadata features are collected from the image dataset through the metadata feature acquisition system. Next, an auxiliary evaluation model is trained by combining the target information dataset and metadata features. The target detection model is called through the model workflow system to detect the image to be detected to obtain real-time detection results. The auxiliary evaluation model is then called to evaluate the real-time detection results. That is, the detection results output by the target detection model are evaluated by the pre-trained auxiliary evaluation model, and the target detection model is dynamically optimized based on the evaluation results to continuously improve the detection accuracy of the target detection model. No manual intervention is required, it can adapt to complex and novel scenes, and the model structure is simple, thus greatly improving the accuracy of image detection and greatly reducing the workload of manual labor.

[0048] 2. By integrating scene metadata (time features, meteorological features, scene features, and image metadata features) with AI image detection results to construct a dual verification mechanism, this system innovatively combines the output of target detection models (such as YOLO) with manually labeled data and random forest-assisted models to form a dynamic closed-loop optimization system. Its advantages include: 1) Utilizing external environmental metadata to compensate for the limitations of pure visual models, significantly improving the robustness of detection in complex scenes (such as rainy / foggy weather, nighttime); 2) Enhancing the credibility and interpretability of results through manual review and iterative model optimization using structured datasets; 3) Modular design (metadata acquisition system, model workflow system) enables efficient collaboration in the detection-judgment process, supporting edge computing deployment and multi-scenario expansion; 4) Standardized data processing and anomaly monitoring mechanisms ensure system stability, while open third-party interfaces provide technical compatibility for cross-domain applications, combining technological innovation with engineering practicality.

[0049] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. An AI image detection method integrating scene metadata, characterized in that: Includes the following steps: Step S1: Train a target detection model using a preset image dataset to output target category, target bounding box position, target bounding box size, bounding box aspect ratio, and confidence score. Manually evaluate the detection results of the target detection model to obtain the manual evaluation results. Construct a structured target information dataset based on the detection results and the manual evaluation results. Step S2: Construct a metadata feature acquisition system based on the spatiotemporal reference alignment module, environmental state perception module, scene semantic perception module, and imaging quality perception module, and acquire metadata features from the image dataset through the metadata feature acquisition system; Step S3: Train an auxiliary judgment model by combining the target information dataset and metadata features; Step S4: Construct a model workflow system, call the target detection model through the model workflow system to detect the image to be detected, obtain real-time detection results, and then call the auxiliary judgment model to judge the real-time detection results.

2. The AI ​​image detection method integrating scene metadata as described in claim 1, characterized in that: In step S1, the target detection model is based on the YOLO architecture; the manual evaluation results are used to verify the detection results and correct the annotations of the image dataset.

3. The AI ​​image detection method integrating scene metadata as described in claim 1, characterized in that: In step S2, the metadata features include at least time features, meteorological features, scene features, and image metadata features; The spatiotemporal reference alignment module is used to automatically establish a temporal mapping relationship between image data and target detection results, and extract timestamp information; The environmental state perception module is used to fuse multi-source meteorological data interfaces to obtain the meteorological environmental state in the image; The scene semantic perception module is used to combine the device topology map with visual feature embedding to generate a semantic description of the scene type; The imaging quality perception module is used to acquire the spatial pose parameters of the camera and image quality indicators. The metadata feature acquisition system supports the acquisition, synchronization, standardization, parsing, storage, and feature engineering of metadata features. It also supports data caching, anomaly monitoring, and log auditing, and is linked with the image acquisition system through task scheduling and event triggers. The standardization process includes at least discretization, numerical encoding, and missing data filling.

4. The AI ​​image detection method integrating scene metadata as described in claim 1, characterized in that: In step S3, the auxiliary judgment model is constructed based on the random forest algorithm; The training process of the auxiliary judgment model is as follows: the target information dataset and metadata features are divided into a training set, a validation set and a test set. The auxiliary judgment model is trained using the training set. During the training process, the hyperparameters of the auxiliary judgment model are continuously optimized. The trained auxiliary judgment model is validated and tested using the validation set and the test set.

5. The AI ​​image detection method integrating scene metadata as described in claim 1, characterized in that: Step S4 specifically involves: A model workflow system is constructed. The model workflow system calls the target detection model to detect the image to be inspected, and obtains real-time detection results carrying the target category, target bounding box position, target image area and confidence level. Then, the metadata feature acquisition system is called to collect real-time metadata features from the image to be inspected. The real-time detection results and real-time metadata features are input into the auxiliary judgment model for judgment, and the judgment result of the image to be inspected carrying the confidence level or the non-confidence level is output.

6. An AI image detection system integrating scene metadata, characterized in that: Includes the following modules: The target detection model training module is used to train a target detection model that outputs target category, target bounding box position, target bounding box size, bounding box aspect ratio, and confidence score using a preset image dataset. The detection results of the target detection model are manually evaluated to obtain the human evaluation results. A structured target information dataset is constructed based on the detection results and the human evaluation results. The metadata feature acquisition system construction module is used to construct a metadata feature acquisition system based on the spatiotemporal reference alignment module, the environmental state perception module, the scene semantic perception module, and the imaging quality perception module, and to acquire metadata features from the image dataset through the metadata feature acquisition system. The auxiliary judgment model training module is used to train an auxiliary judgment model by combining the target information dataset and metadata features. The AI ​​image detection module is used to build a model workflow system. The model workflow system calls the target detection model to detect the image to be detected, obtains the real-time detection results, and then calls the auxiliary judgment model to judge the real-time detection results.

7. The AI ​​image detection system integrating scene metadata as described in claim 6, characterized in that: In the target detection model training module, the target detection model is based on the YOLO architecture; the manual evaluation results are used to verify the detection results and correct the annotations of the image dataset.

8. The AI ​​image detection system integrating scene metadata as described in claim 6, characterized in that: In the metadata feature acquisition system construction module, the metadata features include at least time features, meteorological features, scene features, and image metadata features; The spatiotemporal reference alignment module is used to automatically establish a temporal mapping relationship between image data and target detection results, and extract timestamp information; The environmental state perception module is used to fuse multi-source meteorological data interfaces to obtain the meteorological environmental state in the image; The scene semantic perception module is used to combine the device topology map with visual feature embedding to generate a semantic description of the scene type; The imaging quality perception module is used to acquire the spatial pose parameters of the camera and image quality indicators. The metadata feature acquisition system supports the acquisition, synchronization, standardization, parsing, storage, and feature engineering of metadata features. It also supports data caching, anomaly monitoring, and log auditing, and is linked with the image acquisition system through task scheduling and event triggers. The standardization process includes at least discretization, numerical encoding, and missing data filling.

9. The AI ​​image detection system integrating scene metadata as described in claim 6, characterized in that: In the auxiliary judgment model training module, the auxiliary judgment model is constructed based on the random forest algorithm; The training process of the auxiliary judgment model is as follows: the target information dataset and metadata features are divided into a training set, a validation set and a test set. The auxiliary judgment model is trained using the training set. During the training process, the hyperparameters of the auxiliary judgment model are continuously optimized. The trained auxiliary judgment model is validated and tested using the validation set and the test set.

10. The AI ​​image detection system integrating scene metadata as described in claim 6, characterized in that: The AI ​​image detection module is specifically used for: A model workflow system is constructed. The model workflow system calls the target detection model to detect the image to be inspected, and obtains real-time detection results carrying the target category, target bounding box position, target image area and confidence level. Then, the metadata feature acquisition system is called to collect real-time metadata features from the image to be inspected. The real-time detection results and real-time metadata features are input into the auxiliary judgment model for judgment, and the judgment result of the image to be inspected carrying the confidence level or the non-confidence level is output.