Image hidden danger identification parameter optimization method and system based on cascade model

The image hazard identification method using cascaded models utilizes lightweight convolutional neural networks and bounding box regression to quickly locate hazard areas. By combining fine-grained identification and standard image library feature similarity calculation, it solves the problems of insufficient identification accuracy and scene adaptability in existing technologies, and achieves efficient and accurate hazard identification in complex environments.

CN122023747APending Publication Date: 2026-05-12浙江省应急管理科学研究院(浙江省安全生产技术检测检验中心浙江省危险化学品登记中心) +1
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
浙江省应急管理科学研究院(浙江省安全生产技术检测检验中心浙江省危险化学品登记中心)
Filing Date
2025-12-31
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies are not good at identifying potential hazards in complex scenarios and lack scene adaptability, making it difficult to adapt to changes in lighting, occlusion interference, and cross-scenario applications.

Method used

An image hazard identification method using a cascaded model is proposed. It quickly locates hazard areas through a lightweight convolutional neural network and bounding box regression. It combines a fine-grained identification model and a standard hazard reference image library to calculate feature similarity, generate comprehensive identification results, and optimize identification parameters according to the scenario.

Benefits of technology

It improves the accuracy and scene adaptability of image-based hazard identification, ensuring that the scope of suspected hazards can be accurately located and reliable identification results can be provided in different environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023747A_ABST
    Figure CN122023747A_ABST
Patent Text Reader

Abstract

The invention discloses an image hidden danger identification parameter optimization method and system based on a cascade model, and relates to the technical field of data processing. The method comprises the steps that a target image is collected, hidden danger areas are recognized, and a hidden danger candidate area set is obtained; performing fine-grained identification on each hidden danger candidate region in the hidden danger candidate region set to obtain a plurality of identification hidden danger descriptions; introducing a standard hidden danger reference image library, and carrying out feature similarity calculation on the hidden danger candidate region set to obtain a plurality of comparison hidden danger descriptions; generating a comprehensive hidden danger identification result according to the plurality of identification hidden danger descriptions and the plurality of comparison hidden danger descriptions; wherein before the hidden danger area is recognized, according to the scene of the target image, parameter optimization is carried out on the large model of fine-grained recognition and the feature similarity calculation parameters. According to the method, the image hidden danger recognition accuracy and the scene adaptability are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to a method and system for optimizing parameters for image hazard identification based on a cascaded model. Background Technology

[0002] With the development of artificial intelligence technology, image AI hazard identification has significant application value in urban security, industrial manufacturing and other fields. It can identify potential hazards such as unsafe conditions of objects and unsafe behaviors of people, thereby improving public safety and production efficiency.

[0003] However, existing technologies generally adopt a single model or fixed structure, which makes it difficult to adapt well to complex scene lighting changes, occlusion interference, and cross-scene applications, resulting in poor recognition accuracy and scene adaptability. Summary of the Invention

[0004] This application provides a method and system for optimizing parameters for image hazard identification based on a cascaded model, aiming to solve the technical problems of poor identification accuracy and scene adaptability in the existing technology.

[0005] In view of the above problems, this application provides a method and system for optimizing image hazard identification parameters based on a cascade model.

[0006] Firstly, this application provides a method for optimizing image hazard identification parameters based on a cascaded model, including: Acquire target images, identify potential hazard areas, and obtain a set of candidate hazard areas; Fine-grained identification is performed on each hazard candidate region within the hazard candidate region set to obtain multiple hazard descriptions; A standard hazard reference image library is introduced, and feature similarity calculation is performed on the set of hazard candidate regions to obtain multiple hazard descriptions for comparison; Based on the multiple identified hazard descriptions and multiple compared hazard descriptions, a comprehensive hazard identification result is generated; Before identifying potential hazard areas, the parameters of the large model for fine-grained identification and the feature similarity calculation parameters are optimized based on the scene of the target image.

[0007] Secondly, this application provides an image hazard identification parameter optimization system based on a cascaded model, including: The hazard area preliminary screening module is used to acquire target images, identify hazard areas, and obtain a set of hazard candidate areas; The hazard fine-grained identification module is used to perform fine-grained identification of each hazard candidate region in the hazard candidate region set to obtain multiple hazard descriptions; The feature comparison and analysis module is used to introduce a standard hazard reference image library, perform feature similarity calculation on the set of hazard candidate regions, and obtain multiple comparison hazard descriptions; The comprehensive hazard assessment module is used to generate a comprehensive hazard identification result based on the multiple identified hazard descriptions and multiple compared hazard descriptions; Before identifying potential hazard areas, the parameters of the large model for fine-grained identification and the feature similarity calculation parameters are optimized based on the scene of the target image.

[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages: This application provides a method and system for optimizing parameters for image hazard identification based on a cascaded model. By acquiring target images and identifying candidate hazard regions, the system accurately locates the range of suspected hazards. Then, it performs fine-grained identification on the candidate regions to finely distinguish hazard descriptions. Subsequently, it introduces a standard hazard reference image library to calculate feature similarity, thereby enhancing the accuracy of feature matching. Finally, it combines the two types of identification results to generate a comprehensive hazard identification result. Furthermore, the system optimizes relevant parameters according to the scenario before identification, effectively improving the accuracy and scenario adaptability of hazard identification. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 A flowchart illustrating the image hazard identification parameter optimization method based on a cascaded model provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of the image hazard identification parameter optimization system based on the cascade model provided in this application embodiment; The components represented by each number in the attached diagram are explained below: The module includes: Module 11 for initial screening of potential hazards, Module 12 for detailed identification of potential hazards, Module 13 for feature comparison and analysis, and Module 14 for comprehensive assessment of potential hazards. Detailed Implementation

[0011] This application provides a method and system for optimizing image hazard identification parameters based on a cascaded model, which is used to address the technical problems of poor identification accuracy and scene adaptability in existing technologies.

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0013] It should be noted that the terms "comprising" and "having" are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to these processes, methods, products, or devices.

[0014] Example 1, as Figure 1 As shown, this application provides a method for optimizing image hazard identification parameters based on a cascaded model, the method comprising: S100: Acquire target images, identify potential hazard areas, and obtain a set of candidate hazard areas.

[0015] In this application, target images are acquired, and hazard areas are identified to obtain a set of candidate hazard areas. A lightweight convolutional neural network is used to balance feature extraction efficiency and computational cost, while bounding box regression is combined to achieve rapid and accurate localization of hazard areas. This allows for the selection of effective candidate ranges for subsequent fine-grained identification, avoiding irrelevant areas from consuming subsequent computational resources.

[0016] Step S100 in the method provided in this application embodiment includes: A lightweight convolutional neural network is used to extract features from the target image and generate a preliminary feature map. Based on the preliminary feature map, multiple sets of candidate hazard regions are generated using the bounding box regression method.

[0017] First, a lightweight convolutional neural network (CNN) is used to extract features from the target image, generating a preliminary feature map. A lightweight CNN is a type of CNN that reduces computational cost and parameter count by simplifying the network structure while retaining key feature extraction capabilities, such as YOLOv1-tiny and MobileNet. The use of lightweight CNNs aims to achieve rapid image data processing while maintaining the effectiveness of basic feature extraction, meeting the real-time requirements of hazard identification and avoiding the high time consumption issues associated with complex models.

[0018] The preliminary feature map is a two-dimensional feature matrix output by a lightweight convolutional neural network after processing the target image. It contains features of key targets in the image, such as object edges, textures, shapes, and color distributions, while filtering out redundant information from irrelevant backgrounds such as walls and floors. For example, a real-time monitoring image of a machine shop workshop is captured. The image contains multiple bearing processing machines, two workers, and the background wall of the workshop. This image is input into a lightweight MobileNet model. The model quickly extracts key features such as the circular outline of the bearings and the outline of the workers' bodies, filters out redundant texture information from the walls, and finally generates a preliminary feature map. In the feature map, the bearing area and the worker's hand area have higher brightness, marking the locations of two types of target features that may pose potential hazards.

[0019] Secondly, based on the preliminary feature map, multiple sets of candidate hazard regions are generated using bounding box regression. Bounding box regression is an algorithm for precise target localization. It learns the positional deviations between the initial bounding box predicted by the model and the actual hazard region bounding box, including x-coordinate offset, y-coordinate offset, width deviation, and height deviation. By continuously adjusting the coordinates and dimensions of the initial bounding box, it finally outputs a bounding box that highly matches the actual hazard region.

[0020] The hazard candidate region set is a collection of multiple precise bounding boxes and corresponding regional features. Each bounding box corresponds to a region in the preliminary feature map that is suspected of having a hazard, and is the direct analysis object for subsequent fine-grained identification. Based on the suspected target regions with high brightness in the preliminary feature map, multiple initial bounding boxes are generated, covering the approximate range of the suspected targets. The bounding box regression method is used to compare the initial bounding boxes with a preset sample library of hazard region bounding boxes, and the positional deviation is calculated. The x and y coordinates and width and height dimensions of the initial bounding boxes are adjusted according to the deviation value to obtain the final bounding boxes that accurately match the suspected hazard regions. All final bounding boxes are collected to form the hazard candidate region set.

[0021] For example, for the two preliminary feature maps with relatively high brightness generated above, namely the bearing area and the worker's hand area, two initial bounding boxes are generated, roughly covering the entire bearing and the upper body of the worker, respectively. Bounding box regression is used to calculate the deviation values: the initial bearing bounding box does not completely cover the bearing edge and needs to be shifted 5 pixels to the right and its width increased by 3 pixels; the initial worker bounding box is too large and its height needs to be reduced to only cover the hand area. After adjusting according to the deviation values, two bounding boxes are obtained, covering the suspected protruding area on the bearing surface and selecting the worker's hand area; the two bounding boxes together form a set of candidate hazard areas.

[0022] In this embodiment, a lightweight model is used to shorten feature extraction time, improve the efficiency of hazard area location, and adapt to real-time inspection requirements; a bounding box regression method is used to obtain the selection deviation of hazard areas, ensuring the accuracy of area location and avoiding omissions or misselection of irrelevant areas; through the selected hazard candidate area set, subsequent fine-grained identification does not need to process the entire image, but only focuses on key areas, directly reducing the computational load of subsequent steps, laying the foundation for an overall efficient and accurate hazard identification process.

[0023] S200: Perform fine-grained identification on each hazard candidate region in the hazard candidate region set to obtain multiple hazard descriptions.

[0024] In this embodiment, each candidate hazard region within the set of hazard candidate regions undergoes fine-grained identification to obtain multiple hazard descriptions. S100 has identified suspected hazard regions, but only the potential hazard range is defined, without specifying the exact hazard. A hazard identification model is trained using sample data to perform fine-grained identification on each candidate region, outputting a detailed hazard description and providing a classification basis for hazard mitigation.

[0025] Step S200 in the method provided in this application embodiment includes: Obtain the candidate region set of potential hazards and the hazard description set for sample identification; Based on a neural network, a hazard identification model is trained using the sample hazard candidate region set and the sample hazard identification description set. Input images of multiple hazard candidate regions into the hazard identification model, and output multiple hazard descriptions.

[0026] First, obtain the candidate region set and the hazard description set for sample identification. The candidate region set is a collection of images of suspected hazard areas that have been labeled in historical images. Each candidate region is a fragment cropped from the original image, covering different scenarios and types of hazards. The hazard description set is a set of labels that corresponds one-to-one with the candidate region set. Each hazard description is a specific description of the hazard in the corresponding candidate region, and the labels must be manually verified to ensure accuracy.

[0027] Furthermore, inspection images from historical periods are collected, and images containing clear potential hazards are selected. These images are then manually annotated, for example, by using bounding boxes to select hazard areas and cropping out the images as candidate hazard areas for samples. Each cropped image is then labeled with a specific hazard description to form a sample identification hazard description set.

[0028] Secondly, based on the neural network, the hazard identification model is trained using the sample hazard candidate region set and the sample hazard identification description set.

[0029] The training of the hazard identification model includes: Collect a set of candidate regions for potential hazards from the samples, and annotate them to obtain a set of hazard descriptions for sample identification; Using the sample hazard candidate region image set as input and the sample hazard identification description set as supervision, the hazard identification model is trained until convergence, thus generating the hazard identification model.

[0030] First, a set of candidate images of potential hazards is collected, and then labeled to obtain a set of hazard descriptions for hazard identification. For example, images of a machine shop's workshop over the past six months are collected, and 500 images containing potential hazards are selected: 200 images contain abnormalities on the bearing surface, including protrusions, cracks, and wear; 300 images contain abnormalities in worker protective equipment, including not wearing gloves, not wearing safety helmets, and not wearing protective shoes. The 500 hazard images are then manually labeled: image segments of abnormal bearing surface areas and abnormal worker protective equipment areas are cropped to form a set of candidate hazard regions; simultaneously, each image segment is labeled with a category, such as bearing surface protrusion, worker not wearing protective gloves, etc., forming a set of hazard descriptions for hazard identification corresponding to the set of candidate hazard regions.

[0031] Secondly, using the sample hazard candidate region image set as input and the sample hazard description set as supervision, the hazard identification model is trained until convergence, generating the hazard identification model. Neural networks refer to deep learning networks with fine-grained feature capture capabilities, such as Transformer-based models and improved ResNet models. Through nonlinear transformations of multiple layers of neurons, they can learn the mapping relationship between subtle features in images and hazard descriptions. After training on the sample set, the hazard identification model can input candidate region images and output corresponding hazard descriptions, accurately determining the hazard type from the subtle features of the region images. A basic neural network architecture, such as Transformer, is selected, where the attention mechanism focuses on subtle features within the region. The sample hazard candidate region images from the training set are input into the network, which extracts fine-grained features such as edges, textures, and shapes of the regions. The deviation between the model's predicted category and the sample hazard description set is calculated using a loss function. The attention weights and fully connected layer parameters of the network are adjusted using backpropagation to reduce the deviation. This process is iterated repeatedly until the loss value stabilizes at a low level for several consecutive rounds and the prediction accuracy reaches a preset threshold. Training is then stopped, resulting in an optimized hazard identification model.

[0032] First, the data needed to train the model is prepared. The training process is based on 500 samples, including 200 samples of abnormal bearing areas and 300 samples of abnormal worker safety features. The abnormal bearing area samples cover types such as bearing surface protrusions, cracks, and wear, while the abnormal worker safety feature samples cover types such as workers not wearing protective gloves or safety helmets. These samples serve both as image data input to the model and as corresponding descriptions of actual hazards, acting as a monitoring basis during the training process.

[0033] Secondly, the model was built. The Transformer was chosen as the basic network architecture, comprising two branches. The feature extraction branch consists of a self-attention layer and a feedforward neural network. Its main function is to extract fine-grained features from candidate region images, capturing subtle features such as the curvature of bearing protrusions, edge smoothness, and the texture of workers' protective gear, and converting these features into feature signals that the model can process. The category judgment branch consists of a fully connected layer and a softmax function. Its role is to receive the feature signals output from the feature extraction branch, map them to a predefined hazard description space, and finally output the prediction results corresponding to the hazard descriptions, such as bearing surface protrusions, bearing surface cracks, and workers not wearing protective gloves.

[0034] Next, the model is trained using sample data. After inputting the prepared samples into the model, the feature extraction branch extracts features from the sample images and generates feature signals, while the category judgment branch outputs a predicted category based on these signals. Using the actual hazard description corresponding to the sample as supervision, the deviation between the predicted category and the actual category is calculated. The parameters of the feature extraction branch and the category judgment branch are adjusted through a backpropagation mechanism to reduce the deviation. The above training process is repeated until the model's prediction accuracy for the samples stabilizes above 90%, and the fluctuation range of the prediction deviation is minimal across multiple rounds. At this point, the model reaches convergence, and training is stopped, resulting in the trained hazard identification model.

[0035] Furthermore, images of multiple hazard candidate regions are input into the hazard identification model, and multiple hazard descriptions are output. From the hazard candidate region set obtained in S100, the region image corresponding to each bounding box is extracted; the cropped region images are preprocessed, such as size normalization to 224×224 pixels and contrast adjustment, to ensure consistency with the sample format during model training; the preprocessed region images are input one by one into the trained hazard identification model; the hazard identification model outputs the hazard description corresponding to each region. For example, from the hazard candidate region set obtained in S100, two region images are extracted: a cropped image of the suspected protrusion area on the bearing surface and a cropped image of the worker's hand area. After preprocessing the two images to 224×224 pixels, they are input into the trained hazard identification model. The hazard identification model analyzes the protrusion curvature and edge features of the bearing area and outputs the hazard description as "[Bearing surface protrusion]"; by analyzing the ungloved texture and exposed skin features of the worker's hand area, it outputs the hazard description as "[Worker not wearing protective gloves]".

[0036] In this embodiment, a sample set covering multiple scenarios and types of hazards is constructed. A dedicated hazard identification model is trained using a neural network with fine-grained feature capture capabilities. Then, each hazard candidate area image output by S100 is accurately classified and a specific category is output. This achieves a qualitative transformation of hazards from location range to clear type, providing a refined identification benchmark for subsequent comparison with the standard hazard reference image library. This ensures that subsequent comparisons can be accurately matched based on specific categories, laying a classification foundation for the accuracy of the final comprehensive result.

[0037] S300: Introduce a standard hazard reference image library, perform feature similarity calculation on the set of hazard candidate regions, and obtain multiple comparison hazard descriptions.

[0038] In this embodiment, a standard hazard reference image library is introduced to calculate the feature similarity of the candidate hazard regions, obtaining multiple hazard descriptions for comparison. Hazard descriptions obtained through a hazard identification model may lead to misjudgments due to insufficient differentiation of similar features or incomplete sample coverage. Relying solely on the identification results of a single model may result in biased hazard description judgments, affecting the accuracy of subsequent processing. Therefore, a standard reference image library covering typical hazards is introduced. Through feature similarity calculation, the model identification results are verified with authoritative standard features, solving the problem of potential misjudgments by a single model and providing dual criteria for hazard description judgment.

[0039] Step S300 in the method provided in this application embodiment includes: Construct a standard hazard reference image library covering descriptions of typical hazards, and extract features and store vectorized data for each standard hazard reference image; For each potential hazard region, feature extraction is performed to generate multiple candidate region feature vectors; Calculate the similarity between the feature vector of each candidate region and the feature vector of each standard hazard reference map in the standard hazard reference map library to obtain multiple sets of comparison similarities; Select the hazard description corresponding to the standard hazard reference image with the highest comparison similarity as the comparison hazard description of the hazard candidate area, and output multiple comparison hazard descriptions.

[0040] First, a standard hazard reference image library covering typical hazard descriptions is constructed. Features are extracted and vectorized for each standard hazard reference image. The standard hazard reference image library is a database storing standard sample images of various typical hazards, covering common hazard types in the target scene, such as bearing surface protrusions, cracks, and wear; workers not wearing gloves, safety helmets, or protective shoes, etc. Each image is a typical representative of its type. Feature vectorization storage refers to extracting features from the standard hazard reference images, converting them into fixed-dimensional feature vectors, and storing them for subsequent rapid calculation of similarity with candidate region features. Typical hazard types in the target scene are identified to determine the categories to be covered. Typical sample images of each type of hazard are collected and verified by industry experts to form the standard hazard reference image library. Using a network consistent with the candidate region feature extraction, features are extracted from each standard image. Feature vectors of the standard images are extracted from the output of the fully connected layers or the global pooling layer after the last convolutional layer of the network, categorized by type, and stored in the image library to form a standard feature vector library. For example, in a machine shop setting, six typical potential hazards were identified: bearing surface protrusions, bearing surface cracks, bearing surface wear, workers not wearing protective gloves, workers not wearing safety helmets, and workers not wearing protective shoes. Fifty typical images were collected for each of the six hazard types to form a standard hazard reference image library. For instance, the image for [bearing surface protrusions] includes 0.3-0.8cm protrusion features under different equipment models and lighting conditions, and was confirmed by workshop engineers to meet the protrusion standard. The feature extraction branch of the Transformer was used to process each standard image, extracting a 2048-dimensional feature vector from the global pooling layer. For example, the vector for the [bearing surface protrusions] standard image includes values ​​corresponding to the protrusion height and edge smoothness, etc., and these are stored as a standard feature vector library categorized into six types.

[0041] Secondly, feature extraction is performed on each potential hazard candidate region to generate multiple candidate region feature vectors.

[0042] In this process, features are extracted from each potential hazard region to generate multiple candidate region feature vectors, including: A feature extraction network is used to process the image of each potential hazard region; From the output of the fully connected layer or the global pooling layer following the last convolutional layer of the feature extraction network, candidate region feature vectors are extracted to obtain multiple candidate region feature vectors.

[0043] First, a feature extraction network is used to process each candidate hazard region image. The feature extraction network refers to a deep learning network used to extract image features, consistent with standard image library feature extraction networks, such as the feature extraction branch of the Transformer. This ensures that the features of the candidate region and the standard image are in the same dimensional space, guaranteeing the effectiveness of similarity calculation. From the hazard candidate region set of S100, the region image corresponding to each bounding box is extracted. The region images are preprocessed, consistent with standard image library preprocessing, such as size normalization and contrast adjustment. For example, from the hazard candidate region set of S100, two region images are extracted: an image of a suspected protrusion on the bearing surface and an image of a worker's hand, both resized to 224×224 pixels.

[0044] Secondly, candidate region feature vectors are extracted from the output of the fully connected layer or the global pooling layer following the last convolutional layer of the feature extraction network, resulting in multiple candidate region feature vectors. A fully connected layer is a fundamental structure in a neural network, composed of multiple neurons. Each neuron within the layer is connected to all neurons in the previous layer, forming a fully connected relationship. In the feature processing flow, the main function of the fully connected layer is to integrate and map the high-dimensional features output by the preceding layers. The features extracted by the preceding layers are often scattered local information, such as the edge of a bearing protrusion or the texture of a worker's hand. The fully connected layer fuses these scattered features into a holistic feature through weight calculation and then maps it to the target output space, such as the probability distribution describing potential hazards. The global pooling layer is a structure located after the last convolutional layer in a convolutional neural network. By performing global average or max pooling on the feature map output by the convolution, it converts the two-dimensional feature map into a one-dimensional feature vector, preserving key features while unifying the vector dimension. The preprocessed region image is input into a feature extraction network, where features are extracted through convolutional layers and self-attention layers. Feature vectors for each region are extracted from the output of the fully connected layers or the output of the global pooling layer after the last convolutional layer, resulting in candidate region feature vectors. For example, preprocessed images of a suspected bulge on a bearing surface and a worker's hand are input into the feature extraction branch of a Transformer. The network captures features such as the curvature of the bearing bulge and the skin texture of the worker's hand through self-attention layers. A 2048-dimensional feature vector is extracted from the output of the global pooling layer after the last convolutional layer. The bearing region vector includes dimensions such as bulge height and edge curvature, while the worker's hand region vector includes dimensions such as skin texture density and glove-free reflectivity, resulting in two candidate region feature vectors.

[0045] Furthermore, the similarity between the feature vector of each candidate region and the feature vectors of each standard hazard reference image in the standard hazard reference image library is calculated to obtain multiple comparison similarity sets. Similarity calculation refers to the operation that measures the degree of similarity between two feature vectors. The cosine similarity algorithm is commonly used, which calculates the similarity by taking the cosine of the angle between the vectors. The similarity range is 0-1, with values ​​closer to 1 indicating greater similarity. A comparison similarity set refers to a set of similarity values ​​obtained after calculating the similarity between the feature vector of a single candidate region and all standard feature vectors in the standard hazard reference image library. Each value corresponds to the similarity level of a standard image. For each candidate region feature vector, the standard feature vector library in the standard hazard reference image library is called; the cosine similarity algorithm is used to calculate the similarity between the candidate vector and all standard feature vectors in the library one by one; all calculation results are collected to form the comparison similarity set corresponding to that candidate region.

[0046] For example, for the candidate feature vector of [suspected protrusion area on bearing surface], a standard feature vector library is called. The cosine similarity algorithm is used to calculate the similarity: 0.91 with the standard vector of [bearing surface protrusion], 0.62 with the standard vector of [bearing surface crack], 0.58 with the standard vector of [bearing surface wear], 0.25 with the standard vector of [worker not wearing protective gloves], 0.21 with the standard vector of [worker not wearing safety helmet], and 0.18 with the standard vector of [worker not wearing protective shoes]. The resulting set of similarity scores for the candidate vector of [suspected protrusion area on bearing surface] is {0.91, 0.62, 0.58, 0.25, 0.21, 0.18}. Similarly, the similarity set of candidate vectors for the [worker's hand region] is {0.23, 0.20, 0.17, 0.93, 0.35, 0.29}.

[0047] Finally, the hazard description corresponding to the standard hazard reference image with the highest similarity is selected as the comparison hazard description for the candidate hazard region, and multiple comparison hazard descriptions are output. The comparison hazard description refers to the standard hazard description that is closest to the characteristics of the candidate region, determined through similarity calculation; it serves as a standard reference for judging the hazard type of the candidate region. For each candidate region's comparison similarity set, the highest similarity value is selected; the category of the standard hazard reference image corresponding to this highest similarity is found; this category is determined as the comparison hazard description for the candidate region; and the comparison hazard descriptions for all candidate regions are collected to form the output result. For example, the similarity set for the [suspected protrusion area on the bearing surface] is {0.91, 0.62, 0.58, 0.25, 0.21, 0.18}, with a highest similarity of 0.91, corresponding to the standard image category of [bearing surface protrusion]. Therefore, the comparison hazard description for this candidate area is [bearing surface protrusion]. Similarly, the similarity set for the [worker's hand area] is {0.23, 0.20, 0.17, 0.93, 0.35, 0.29}, with a highest similarity of 0.93, corresponding to the standard image category of [worker not wearing protective gloves]. Therefore, the comparison hazard description for this candidate area is [worker not wearing protective gloves]. These two comparison hazard descriptions are then output.

[0048] In this embodiment, by constructing a standard reference library covering typical hazards and storing its feature vectors, features are extracted from each hazard candidate region of S100 and the similarity with the standard features is calculated. Finally, the category corresponding to the highest similarity is selected as the comparison result. This not only provides an independent verification basis based on authoritative standards for the identification and description of hazards in S200, effectively solving the problem of misjudgment of hazards with similar features by a single model, but also improves the uniformity of hazard description judgment in different scenarios through the consistency of standard features. This provides a reliable comparison benchmark for the subsequent generation of comprehensive hazard identification results, further ensuring the accuracy and credibility of the overall identification results.

[0049] S400: Generate a comprehensive hazard identification result based on the multiple identified hazard descriptions and multiple compared hazard descriptions.

[0050] In this embodiment, a comprehensive hazard identification result is generated based on the multiple identified hazard descriptions and multiple compared hazard descriptions. The identified hazard description in S200 relies on the model's learning of sample features, which may lead to bias due to incomplete sample coverage or interference from similar features. The compared hazard description in S300 is based on feature matching from a standard image library, which may have limitations in judgment due to the library not containing rare hazard features. Using only a single result can easily lead to errors in the final judgment due to the limitations of each. Therefore, S400 is needed to integrate the two types of results. When the two types of results are consistent, the credibility of the result is enhanced; when they are inconsistent, the differences are retained for further verification, providing a more comprehensive and reliable basis for hazard handling.

[0051] Step S400 in the method provided in this application embodiment includes: When the description of the identified hazard in the candidate region matches the description of the compared hazard, the output is the comprehensive hazard identification result; When the identified hazard description is inconsistent with the compared hazard description, the two hazard descriptions are output as a comprehensive hazard identification result.

[0052] First, when the description of the identified hazard in a candidate region matches the description of the compared hazard, the comprehensive hazard identification result is output. A correspondence is established between candidate regions and two categories, with each candidate region associated with one identification category and one comparison category. For each candidate region, the text descriptions of the identified hazard and the compared hazard are compared word by word. If the two texts are completely identical, the category is determined as the comprehensive hazard identification result for that candidate region. Consistent categories from all candidate regions are collected to form the final output set of comprehensive results. For example, for two hazard candidate regions in S100: the identified hazard description for the bearing surface is [bearing surface protrusion], and the comparison hazard description is also [bearing surface protrusion], so the two categories match, and the comprehensive result is determined as [bearing surface protrusion]; the identified hazard description for the worker's hand is [worker not wearing protective gloves], and the comparison hazard description is also [worker not wearing protective gloves], so the two categories match, and the comprehensive result is determined as [worker not wearing protective gloves]. The final output comprehensive hazard identification result is: {bearing surface protrusion, worker not wearing protective gloves}.

[0053] Secondly, when the identified hazard description and the compared hazard description are inconsistent, both hazard descriptions are output as a comprehensive hazard identification result. For each candidate region, the identified hazard description and the compared hazard description are compared; if the two text descriptions are different, both categories are retained; the comprehensive result of the candidate region is labeled in the format of [Suspected Identified Hazard Description / Compared Hazard Description], clearly indicating the difference; the results of all candidate regions are collected to form the final output comprehensive result set. For example, for a certain hazard candidate region: the identified hazard description is [Bearing Surface Crack], and the compared hazard description is [Bearing Surface Wear], the two categories are inconsistent; the comprehensive result is labeled as [Suspected Bearing Surface Crack / Bearing Surface Wear], indicating that the actual hazard type of the region needs to be manually verified; if there is another consistent region, whose comprehensive result is [Worker Not Wearing a Safety Helmet], then the final output comprehensive hazard identification result is: {Suspected Bearing Surface Crack / Bearing Surface Wear, Worker Not Wearing a Safety Helmet}.

[0054] In this embodiment, by judging the consistency between the identified hazard description and the compared hazard description, the category is directly output when the two results are consistent, thus enhancing the credibility of the result; when the results are inconsistent, both categories are retained and the differences are marked, avoiding the risk of misjudgment from a single judgment. This approach integrates the dual advantages of model learning and standard image libraries, and provides clear direction for manual intervention through difference prompts, ultimately improving the reliability of the comprehensive hazard identification results and providing a comprehensive and rigorous basis for the accurate handling and review of hazards.

[0055] In this embodiment, image features differ significantly across different scenarios: strong light easily causes glare interference, low light blurs details, and rainy days result in image fogging. Using fixed parameters can lead to a decrease in recognition accuracy in specific scenarios. Furthermore, scene features may change over time, making it difficult for fixed parameters to continuously adapt. Therefore, scenario-based parameter optimization and dynamic adjustment are necessary to adapt parameters to scene changes and ensure consistent recognition accuracy across different scenarios.

[0056] Before identifying potential hazard areas, the parameters of the large-scale model for fine-grained identification and the feature similarity calculation parameters are optimized based on the scene of the target image, including: A parameter optimization database is constructed to store the mapping relationship between different application scenarios and the optimal identification parameter configuration. The identification parameters include at least the confidence threshold for identifying hidden danger areas, the attention weight for fine-grained identification areas, and the feature matching similarity threshold. Based on the scene features of the target image, the parameter optimization database is queried, and the corresponding optimal recognition parameter configuration is loaded.

[0057] First, a parameter optimization database is constructed to store the mapping relationship between different application scenarios and the optimal identification parameter configuration. The identification parameters include at least the confidence threshold for identifying hazardous areas, the attention weight for fine-grained identification regions, and the feature matching similarity threshold. The parameter optimization database stores the mapping relationship between [application scenarios - optimal identification parameter configurations], where [application scenarios] include high-light workshops, low-light warehouses, and outdoor rainy days, and [optimal identification parameter configurations] are experimentally verified parameter combinations adapted to these scenarios. Identification parameters refer to the key parameters affecting the identification effect, including: the confidence threshold for identifying hazardous areas: a critical value for filtering low-probability candidate areas, such as 0.7 indicating that only areas with a probability ≥70% that the model determines are hazardous areas are retained; the attention weight for fine-grained identification regions: the degree of attention the model pays to key features within the region; the higher the weight, the greater the feature's influence; and the feature matching similarity threshold: a critical value for selecting highly similar standard images, such as 0.8 indicating that only standard images with a feature similarity ≥80% to candidate areas are retained. Construct a parameter optimization database and identify typical application scenarios, such as high-light workshops, low-light warehouses, and outdoor rainy days. For each scenario, conduct multiple sets of experiments to test the recognition effect of different parameter combinations, and select the parameter combination with the highest accuracy as the optimal recognition parameter configuration for that scenario. Establish a mapping table of [application scenario - optimal recognition parameter configuration] and store it as the parameter optimization database.

[0058] Secondly, based on the scene features of the target image, the parameter optimization database is queried, and the corresponding optimal recognition parameter configuration is loaded. Scene features refer to the environmental attributes of the target image, such as light intensity, background complexity, and weather conditions, used to match the application scene types in the database. Scene features of the target image are extracted by calculating light intensity, background complexity, etc., using image analysis tools; based on these scene features, the parameter optimization database is queried, and the optimal recognition parameter configuration for the corresponding scene is called and applied to subsequent recognition processes.

[0059] For example, in the scenario of a machine processing plant, two typical scenarios were identified: a "high-light workshop" and a "low-light warehouse." For the high-light workshop, the optimal recognition parameter configuration was determined experimentally: a confidence threshold of 0.75, a bearing edge feature attention weight of 1.3, and a similarity threshold of 0.85. For the low-light warehouse, the optimal recognition parameter configuration was determined experimentally: a confidence threshold of 0.65, a equipment texture feature attention weight of 1.2, and a similarity threshold of 0.75. The mapping relationship between the two application scenarios and the optimal recognition parameters was stored in a parameter optimization database. When the target image is a high-light workshop image, the optimal parameter configuration corresponding to the "high-light workshop" is loaded after querying the parameter optimization database.

[0060] The method further includes dynamically optimizing and adjusting the recognition parameters, including: The test obtains the recognition performance index of the current recognition parameters, and calculates the deviation between the recognition performance index and the target index. The recognition performance index includes accuracy. The deviation rate is calculated based on the deviation amount, and the parameter adjustment amount is also calculated. Adjust the recognition parameters according to the parameter adjustment amount until convergence, and obtain the optimal recognition parameters for different application scenarios.

[0061] First, the recognition performance index of the current recognition parameters is obtained through testing. The deviation between the recognition performance index and the target index is calculated. The recognition performance index includes accuracy. The recognition performance index is a quantitative indicator that measures the recognition performance of the current parameters. It mainly includes accuracy, which is the proportion of correctly identified hazards to the total number of identified hazards, reflecting the accuracy of the recognition results under the parameter configuration. The target index refers to the recognition performance standard preset according to the scene requirements, and is the target benchmark for parameter optimization. The deviation is the difference between the current recognition performance index and the target index. The calculation formula is: Deviation = Current Index - Target Index. If the deviation is negative, it means that the current performance has not met the target. The latest validation set images in the target scene are selected to ensure that the images contain the real features of the current scene. The validation set images are recognized using the currently loaded recognition parameters, and the number of correctly identified hazards is counted. The accuracy is calculated as the current recognition performance index. The deviation is calculated by subtracting the target accuracy from the current accuracy. For example, for the [high-intensity light workshop] scene, the target accuracy is 90%. Fifty workshop images collected at noon over the past three days were selected, containing potential hazards such as bearing abnormalities and lack of worker protection. After identification using the current parameters [confidence threshold 0.75, bearing edge feature attention weight 1.3, similarity threshold 0.85], 42 hazards were correctly identified, and a total of 50 hazards were identified. The current accuracy rate is 42 / 50 × 100% = 84%, and the deviation is 84% ​​- 90% = -6%, meaning the current performance is 6 percentage points lower than the target.

[0062] Secondly, the deviation rate is calculated based on the deviation amount, and the parameter adjustment amount is then calculated. The deviation rate is the ratio of the deviation amount to the target indicator, calculated using the formula: Deviation Rate = Deviation Amount / Target Indicator × 100%, used to quantify the relative degree of deviation. The parameter adjustment amount refers to the parameter correction value calculated based on the deviation rate, reflecting the magnitude of parameter adjustment needed to ensure that the adjustment direction is consistent with the deviation improvement. The deviation amount is divided by the target indicator; adjustment ratios corresponding to the deviation rate are set for different parameters; and the adjustment amount for each identification parameter is calculated according to the deviation rate and adjustment rules. For example, preset parameter adjustment rules are as follows: Confidence threshold: for every -1% of the deviation rate, the threshold is lowered by 0.01; Attention weight: for every -1% of the deviation rate, the weight is increased by 0.02; Similarity threshold: for every -1% of the deviation rate, the threshold is increased by 0.005. Continuing with the high-light workshop case, with a deviation amount of -6% and a target accuracy rate of 90%, the deviation rate = -6% / 90% ≈ -6.67%. Preset adjustment rules: Confidence threshold adjustment amount = -6.67% × 0.01 / (-1%) ≈ 0.067, that is, a decrease of 0.067; Attention weight adjustment amount: -6.67% × 0.02 / (-1%) ≈ 0.133, that is, an increase of 0.133; Similarity threshold adjustment amount: -6.67% × 0.005 / (-1%) ≈ 0.033, that is, an increase of 0.033.

[0063] Finally, the recognition parameters are adjusted according to the parameter adjustment amount until convergence is obtained, thus obtaining the optimal recognition parameters for different application scenarios. Convergence means that after adjusting the parameters, the recognition performance index is consistently stable within the target index range in multiple consecutive tests, and the deviation approaches 0. At this point, the parameters have reached the optimal state for the current scenario. The adjustment amount is applied to the corresponding parameters; the adjusted parameters are used to re-recognize the validation set images, and the new accuracy and deviation are calculated; if the new deviation still does not meet the target, the above steps are repeated, and the deviation rate and adjustment amount are recalculated; when the accuracy in multiple consecutive tests is ≥ the target value, and the fluctuation is ≤1%, and the deviation is ≤1%, the parameters are considered to have converged. The parameters at this point are determined as the optimal parameters for the scenario and updated to the parameter optimization database. For example, in the strong light workshop scenario, the parameters after the first adjustment are: confidence threshold = 0.75 - 0.067 = 0.683, attention weight = 1.3 + 0.133 = 1.433, similarity threshold = 0.85 + 0.033 = 0.883. The test accuracy improved to 88%, with a bias of -2%, resulting in a bias rate of approximately -2.22%. Adjustments were then calculated: the confidence threshold was lowered by 0.022 to 0.661; the attention weight was increased by 0.044 to 1.477; and the similarity threshold was increased by 0.011 to 0.894. The retest achieved an accuracy of 91% with a bias of 1%. Three consecutive tests yielded results of 91%, 90.5%, and 90.8%, with a fluctuation of 0.5% and a bias ≤1%, indicating convergence. The optimal parameters at this point are: [confidence threshold 0.661, attention weight 1.477, similarity threshold 0.894], and updated to the parameter optimization database.

[0064] In this embodiment, by constructing a parameter optimization database, precise matching between different scenarios and optimal parameters is achieved, solving the adaptation problem of fixed parameters in scenarios such as strong light and weak light. Combined with dynamic optimization and adjustment, the parameters can be continuously optimized until convergence as scene characteristics change, ensuring that the recognition performance indicators are consistently met. Ultimately, the recognition accuracy in different scenarios is effectively improved, the false negative rate is effectively reduced, and the parameter support for comprehensive hazard identification results is adapted to different scenarios, ensuring the stability and accuracy of the overall recognition process in diverse environments.

[0065] The embodiments of this application, through the specific implementation methods described above, achieve the following technical effects: This application provides a method and system for optimizing parameters for image hazard identification based on a cascaded model. It extracts features using a lightweight convolutional neural network and combines this with bounding box regression to quickly locate suspected hazard areas in target images, forming a set of hazard candidate regions. This effectively narrows the scope of subsequent analysis, balances feature extraction effectiveness with processing efficiency, and avoids irrelevant areas consuming computational resources. A fine-grained identification model trained on samples accurately classifies each candidate region, distinguishing between similar hazard types such as bearing bulges and cracks, and not wearing gloves and not wearing a safety helmet, thus transforming hazard location into qualitative assessment. A standard hazard reference image library is introduced, and feature similarity calculations provide a comparison category for each candidate region. Standard features are used to verify the model's identification results, reducing the risk of misjudgment due to similar features or rare samples. The identification category and comparison category are integrated; consistency enhances the credibility of the results, while inconsistency preserves the differences for verification. Simultaneously, optimal parameters are loaded based on the scene and dynamically adjusted to convergence, adapting to diverse environments such as strong light, low light, outdoor rain, etc. By dynamically adjusting parameters and adapting to different scenarios, it can meet the recognition needs in different environments, maintain stable recognition results, provide a comprehensive and reliable basis for the accurate handling of hidden dangers, and improve the efficiency and accuracy of hidden danger recognition.

[0066] Example 2, as Figure 2 As shown, this application provides an image hazard identification parameter optimization system based on a cascaded model, the system comprising: The hazard area screening module 11 is used to collect target images, identify hazard areas, and obtain a set of hazard candidate areas. The hazard fine identification module 12 is used to perform fine-grained identification on each hazard candidate region in the hazard candidate region set to obtain multiple hazard descriptions; Feature comparison and analysis module 13 is used to introduce a standard hidden danger reference library, perform feature similarity calculation on the set of hidden danger candidate regions, and obtain multiple comparison hidden danger descriptions; The comprehensive hazard assessment module 14 is used to generate a comprehensive hazard identification result based on the multiple identified hazard descriptions and multiple compared hazard descriptions; Before identifying potential hazard areas, the parameters of the large model for fine-grained identification and the feature similarity calculation parameters are optimized based on the scene of the target image.

[0067] In one embodiment, the hazard area screening module 11 is further used for: A lightweight convolutional neural network is used to extract features from the target image and generate a preliminary feature map. Based on the preliminary feature map, multiple sets of candidate hazard regions are generated using the bounding box regression method.

[0068] In one embodiment, the hazard identification module 12 is further used for: Obtain the candidate region set of potential hazards and the hazard description set for sample identification; Based on a neural network, a hazard identification model is trained using the sample hazard candidate region set and the sample hazard identification description set. Input images of multiple hazard candidate regions into the hazard identification model, and output multiple hazard descriptions.

[0069] The training of the hazard identification model includes: Collect a set of candidate regions for potential hazards from the samples, and annotate them to obtain a set of hazard descriptions for sample identification; Using the sample hazard candidate region image set as input and the sample hazard identification description set as supervision, the hazard identification model is trained until convergence, thus generating the hazard identification model.

[0070] In one embodiment, the feature comparison analysis module 13 is further used for: Construct a standard hazard reference image library covering descriptions of typical hazards, and extract features and store vectorized data for each standard hazard reference image; For each potential hazard region, feature extraction is performed to generate multiple candidate region feature vectors; Calculate the similarity between the feature vector of each candidate region and the feature vector of each standard hazard reference map in the standard hazard reference map library to obtain multiple sets of comparison similarities; Select the hazard description corresponding to the standard hazard reference image with the highest comparison similarity as the comparison hazard description of the hazard candidate area, and output multiple comparison hazard descriptions.

[0071] In this process, features are extracted from each potential hazard region to generate multiple candidate region feature vectors, including: A feature extraction network is used to process the image of each potential hazard region; From the output of the fully connected layer or the global pooling layer following the last convolutional layer of the feature extraction network, candidate region feature vectors are extracted to obtain multiple candidate region feature vectors.

[0072] In one embodiment, the comprehensive hazard assessment module 14 is also used for: When the description of the identified hazard in the candidate region matches the description of the compared hazard, the output is the comprehensive hazard identification result; When the identified hazard description is inconsistent with the compared hazard description, the two hazard descriptions are output as a comprehensive hazard identification result.

[0073] Before identifying potential hazard areas, the parameters of the large-scale model for fine-grained identification and the feature similarity calculation parameters are optimized based on the scene of the target image, including: A parameter optimization database is constructed to store the mapping relationship between different application scenarios and the optimal identification parameter configuration. The identification parameters include at least the confidence threshold for identifying hidden danger areas, the attention weight for fine-grained identification areas, and the feature matching similarity threshold. Based on the scene features of the target image, the parameter optimization database is queried, and the corresponding optimal recognition parameter configuration is loaded.

[0074] The method further includes dynamically optimizing and adjusting the recognition parameters, including: The test obtains the recognition performance index of the current recognition parameters, and calculates the deviation between the recognition performance index and the target index. The recognition performance index includes accuracy. The deviation rate is calculated based on the deviation amount, and the parameter adjustment amount is also calculated. Adjust the recognition parameters according to the parameter adjustment amount until convergence, and obtain the optimal recognition parameters for different application scenarios.

[0075] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.

[0076] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0077] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and modifications fall within the scope of this application and its equivalents, this application intends to include such modifications and modifications.

Claims

1. A method for optimizing image hazard identification parameters based on a cascaded model, characterized in that, The method includes: Acquire target images, identify potential hazard areas, and obtain a set of candidate hazard areas; Fine-grained identification is performed on each hazard candidate region within the hazard candidate region set to obtain multiple hazard descriptions; A standard hazard reference image library is introduced, and feature similarity calculation is performed on the set of hazard candidate regions to obtain multiple hazard descriptions for comparison; Based on the multiple identified hazard descriptions and multiple compared hazard descriptions, a comprehensive hazard identification result is generated; Before identifying potential hazard areas, the parameters of the large model for fine-grained identification and the feature similarity calculation parameters are optimized based on the scene of the target image.

2. The method for optimizing image hazard identification parameters based on a cascaded model according to claim 1, characterized in that, Acquire target images, identify potential hazard areas, and obtain a set of candidate hazard areas, including: A lightweight convolutional neural network is used to extract features from the target image and generate a preliminary feature map. Based on the preliminary feature map, multiple sets of candidate hazard regions are generated using the bounding box regression method.

3. The method for optimizing image hazard identification parameters based on a cascaded model according to claim 1, characterized in that, Fine-grained identification is performed on each hazard candidate region within the hazard candidate region set to obtain multiple hazard descriptions, including: Obtain the candidate region set of potential hazards and the hazard description set for sample identification; Based on a neural network, a hazard identification model is trained using the sample hazard candidate region set and the sample hazard identification description set. Input images of multiple hazard candidate regions into the hazard identification model, and output multiple hazard descriptions.

4. The method for optimizing image hazard identification parameters based on a cascaded model according to claim 3, characterized in that, Training the hazard identification model includes: Collect a set of candidate regions for potential hazards from the samples, and annotate them to obtain a set of hazard descriptions for sample identification; Using the sample hazard candidate region image set as input and the sample hazard identification description set as supervision, the hazard identification model is trained until convergence, thus generating the hazard identification model.

5. The method for optimizing image hazard identification parameters based on a cascaded model according to claim 1, characterized in that, A standard hazard reference image library is introduced, and feature similarity calculation is performed on the set of hazard candidate regions to obtain multiple comparison hazard descriptions, including: Construct a standard hazard reference image library covering descriptions of typical hazards, and extract features and store vectorized data for each standard hazard reference image; For each potential hazard region, feature extraction is performed to generate multiple candidate region feature vectors; Calculate the similarity between the feature vector of each candidate region and the feature vector of each standard hazard reference map in the standard hazard reference map library to obtain multiple sets of comparison similarities; Select the hazard description corresponding to the standard hazard reference image with the highest comparison similarity as the comparison hazard description of the hazard candidate area, and output multiple comparison hazard descriptions.

6. The method for optimizing image hazard identification parameters based on a cascaded model according to claim 4, characterized in that, For each potential hazard region, feature extraction is performed to generate multiple candidate region feature vectors, including: A feature extraction network is used to process the image of each potential hazard region; From the output of the fully connected layer or the global pooling layer following the last convolutional layer of the feature extraction network, candidate region feature vectors are extracted to obtain multiple candidate region feature vectors.

7. The method for optimizing image hazard identification parameters based on a cascaded model according to claim 1, characterized in that, Before identifying potential hazard areas, the parameters of the large-scale model for fine-grained identification and the feature similarity calculation parameters are optimized based on the scene of the target image, including: A parameter optimization database is constructed to store the mapping relationship between different application scenarios and the optimal identification parameter configuration. The identification parameters include at least the confidence threshold for identifying hidden danger areas, the attention weight for fine-grained identification areas, and the feature matching similarity threshold. Based on the scene features of the target image, the parameter optimization database is queried, and the corresponding optimal recognition parameter configuration is loaded.

8. The method for optimizing image hazard identification parameters based on a cascaded model according to claim 6, characterized in that, The method further includes dynamically optimizing and adjusting the identification parameters, including: The test obtains the recognition performance index of the current recognition parameters, and calculates the deviation between the recognition performance index and the target index. The recognition performance index includes accuracy. The deviation rate is calculated based on the deviation amount, and the parameter adjustment amount is also calculated. Adjust the recognition parameters according to the parameter adjustment amount until convergence, and obtain the optimal recognition parameters for different application scenarios.

9. The method for optimizing image hazard identification parameters based on a cascaded model according to claim 1, characterized in that, Based on the multiple identified hazard descriptions and multiple compared hazard descriptions, a comprehensive hazard identification result is generated, including: When the description of the identified hazard in the candidate region matches the description of the compared hazard, the output is the comprehensive hazard identification result; When the identified hazard description is inconsistent with the compared hazard description, the two hazard descriptions are output as a comprehensive hazard identification result.

10. A parameter optimization system for image hazard identification based on a cascaded model, characterized in that, The system is used to implement the image hazard identification parameter optimization method based on a cascaded model as described in any one of claims 1-8, the system comprising: The hazard area preliminary screening module is used to acquire target images, identify hazard areas, and obtain a set of hazard candidate areas; The hazard fine-grained identification module is used to perform fine-grained identification of each hazard candidate region in the hazard candidate region set to obtain multiple hazard descriptions; The feature comparison and analysis module is used to introduce a standard hazard reference image library, perform feature similarity calculation on the set of hazard candidate regions, and obtain multiple comparison hazard descriptions; The comprehensive hazard assessment module is used to generate a comprehensive hazard identification result based on the multiple identified hazard descriptions and multiple compared hazard descriptions; Before identifying potential hazard areas, the parameters of the large model for fine-grained identification and the feature similarity calculation parameters are optimized based on the scene of the target image.