A security risk identification method based on deep learning and visual big model
Through the security risk identification method based on deep learning and visual big models, high-resolution images are generated using multi-scale residual feature networks and global spatiotemporal attention mechanisms, and a visual big model for security risk identification is constructed through the graph generation model and the LORA fine-tuning mechanism. The problems of high labeling cost and low recognition accuracy in traditional methods are solved, and efficient and accurate security risk identification is achieved.
Patent Information
- Application Number
- CN202411823404.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-08
AI Technical Summary
Traditional security risk identification methods require manual labeling of large amounts of image data, which is expensive to label and has low recognition accuracy, making it impossible to effectively utilize the high resolution and diversity of images.
The security risk identification method based on deep learning and visual big models is adopted to construct a super-resolution model of security risk image through multi-scale residual feature network and global spatiotemporal attention mechanism, high-resolution images are generated, and a variety of security risk image sets are generated through the graph generation model and the LORA fine-tuning mechanism to build a visual big model of security risk identification.
It reduces the dependence of the security risk monitoring system on people, saves labeling costs and time, improves the accuracy of security risk identification and the intelligence level of the system, and has the ability to identify security risks in multiple scenarios.
Smart Images

Figure CN119785044A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a security risk identification method, and in particular to a security risk identification method based on deep learning and a large visual model. Background Art
[0002] With the rapid advancement of globalization in recent years, the pace of world economic development has accelerated, science and technology have continued to innovate, and various security incidents have followed, which has put forward higher requirements for situational awareness and early warning of incidents. There are many security risks hidden in the complex and dynamically changing natural environment. If they cannot be identified and eliminated in time, they may trigger security accidents at any time.
[0003] Traditional security risk identification methods are mostly based on the YOLO algorithm. By stacking a large number of convolutional layers and residual connections, the texture details of the image are extracted to detect risk targets. This method requires manual annotation of thousands of image data, which is very costly. At the same time, traditional security risk identification methods do not combine the high resolution and diversity of images, and the accuracy of security risk identification is low. Summary of the invention
[0004] In order to solve the shortcomings of the above-mentioned technology, the present invention provides a security risk identification method based on deep learning and visual big model.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a security risk identification method based on deep learning and visual big model, comprising the following steps:
[0006] Step S1: construct a safety risk image super-resolution model based on a super-resolution dataset, a multi-scale residual feature network, and a global spatiotemporal attention mechanism to generate a high-resolution safety risk image;
[0007] Step S2: Generate a safety risk picture set based on the high-resolution safety risk image and the image-generated large model;
[0008] Step S3: The security risk image set is based on the open source visual big model and LORA fine-tuning mechanism to build a security risk identification visual big model;
[0009] Step S4: Use the natural scene images with safety risks as the input of the safety risk identification visual big model. Based on the standardized prompt engineering and intelligent agent strategy, the safety risk identification visual big model generates warnings and risk prevention and control measures.
[0010] Furthermore, a security risk image super-resolution model is constructed, which specifically includes the following steps:
[0011] Step S11: Collect and organize high-resolution images and public datasets in various scenarios as super-resolution image datasets;
[0012] Step S12: downsampling all original images in the super-resolution image dataset with different degradation factors based on the bicubic interpolation downsampling function to obtain low-resolution images of different sizes;
[0013] Step S13: The low-resolution image and the high-resolution image are used to form a data pair for training a security risk image super-resolution model;
[0014] Step S14: using the low-resolution image as the input of the security risk image super-resolution model, i.e., the low-resolution security risk image, and extracting shallow features through two 3×3 convolutional layers;
[0015] Step S15: passing the extracted shallow features to the nonlinear mapping module of multi-scale residual feature extraction and global spatiotemporal attention mechanism to extract deep features;
[0016] Step S16: Upsampling the shallow features in step S14 and the deep features in step S15 based on sub-pixel convolution to reconstruct a high-resolution security risk image, so as to obtain a high-resolution security risk image as an output of the security risk image super-resolution model.
[0017] Furthermore, in step S15, deep features in the image are mined and extracted based on the nonlinear mapping module, which specifically includes the following steps:
[0018] Step S15-1: Acquire local features in the low-resolution image;
[0019] Step S15-2: Based on the Inception Depthwise Convolution model, i.e., the Inception module in the deep convolution network, a multi-scale residual feature extraction module is formed by combining multiple branches of small-size convolution kernels and large-size convolution kernels; the multi-scale residual feature extraction module operates on the local features of the input, keeps some channels unchanged, performs deep convolution operations on other channels, obtains multi-scale features, and then passes through the residual convolution block to fuse the acquired feature information;
[0020] Step S15-3: Combine the channel attention mechanism and the spatial attention mechanism into a global spatiotemporal attention mechanism;
[0021] Step S15-4: The input features are dimensionally transformed through the channel attention mechanism, and a double-layer multi-layer perceptron is used to amplify the channels across dimensions;
[0022] Step S15-5: After completing the cross-dimensional processing, restore to the original dimension; output the channel attention dimension map through the Sigmoid activation function;
[0023] Step S15-6: Reduce the number of image channels based on the first 7×7 convolution layer in the spatial attention mechanism, restore the number of image channels based on the second 7×7 convolution layer in the spatial attention mechanism, and use the Sigmoid activation function to output the spatial attention map to effectively fuse spatial information and obtain deep features.
[0024] Furthermore, in step S15-1, local features in the low-resolution image are obtained, and a down-sampling operation is performed based on two residual blocks of 1×1 convolution and 3×3 convolution and a ReLU activation function to obtain local features in the low-resolution image; wherein the convolution kernel size is 4 and the step size is 2.
[0025] Furthermore, generating a security risk picture set with various styles in step S2 specifically includes the following steps:
[0026] Step S21: Integrate the reconstructed high-resolution safety risk images into a high-resolution risk picture set, and generate safety risk images with various styles based on the image-generated image macro model and integrate them into a safety risk picture set with various styles;
[0027] Step S22: Integrate the high-resolution risk image set and the safety risk image set with diverse styles to form a safety risk image set.
[0028] Furthermore, in step S3, a large visual model for security risk identification is constructed, which specifically includes the following steps:
[0029] Step S31: annotate the security risk picture set in step S2 using a picture annotation tool to obtain text question-answer pairs in the security risk pictures;
[0030] Step S32: Based on the open source visual model, apply the LORA fine-tuning mechanism and iteratively train the model until the model converges;
[0031] Step S33: Based on the text questions and answers in the safety risk picture, the LORA weight file obtained by training and the weight file of the base visual large model are merged to obtain the safety risk identification visual large model.
[0032] Furthermore, in step S33, the LORA weight file and the weight file of the base visual large model are merged, and the formula for weight merging is:
[0033] h=Wx+BAx;
[0034] Among them, h is the weight parameter of the safety risk identification visual large model; W is the weight parameter of the base visual large model; BA is the weight parameter of LORA after training.
[0035] Furthermore, the risk prevention and control measures are generated in step S4, which specifically include the following steps:
[0036] Step S41: using the pictures with security risks as the input of the security risk identification visual model; writing prompt words based on the Prompt project to stimulate the emergence ability of the security risk identification visual model, so that the security risk identification visual model has the ability to identify security risks in different scenarios;
[0037] Step S42: The safety risk identification visual large model follows the standardized Prompt engineering instructions and combines the safety risk-related knowledge learned during the training process to accurately identify dangerous signals in the environment, issue warnings, and provide specific risk prevention and control measures.
[0038] Furthermore, the prompt words in step S41 include roles and key points.
[0039] Furthermore, the danger signals in step S42 include unsafe behaviors of people, unsafe states of objects, and potential safety risks in the environment.
[0040] The present invention discloses a method for identifying safety risks based on deep learning and a large visual model. The present invention is based on an image super-resolution algorithm based on a multi-scale residual feature network and a global spatiotemporal attention mechanism, which can generate a set of safety risk images with higher quality and richer details to improve the resolution of the image, thereby assisting in the fine-tuning training of the large visual model for safety risk identification and mastering more image texture information; generating safety risk images with diverse styles and different backgrounds through a large graph-generated graph model, which can expand the diversity of data and thereby improve the generalization ability of the large visual model for safety risk identification; the large visual model for safety risk identification constructed through the LORA fine-tuning mechanism significantly improves the intelligence level of the monitoring system and has the ability to identify safety risks in multiple scenarios. Based on standardized prompt engineering and intelligent agent strategies, the large visual model for safety risk identification is assisted in generating detailed risk prevention and control measures, and has a certain degree of autonomy and intelligence, and continuously learns and adapts through interaction with the environment, effectively reducing the occurrence of safety accidents.
[0041] The present invention reduces the dependence of the security risk monitoring system on humans, does not require manual annotation of thousands of image data, and saves annotation costs and time costs; it combines the high resolution and diversity of images to improve the accuracy of security risk identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is the overall flow chart of the present invention.
[0043] Figure 2 This is a flowchart for obtaining a super-resolution data set in the present invention.
[0044] Figure 3 This is a flow chart of multi-scale residual feature extraction in Embodiment 1 of the present invention.
[0045] Figure 4 This is a flow chart of step S2 in the first embodiment of the present invention.
[0046] Figure 5 It is a schematic diagram of the second embodiment of the present invention.
[0047] Figure 6 This is a flow chart of step S3 in the first embodiment of the present invention.
[0048] Figure 7 This is a flow chart of step S4 in the first embodiment of the present invention.
[0049] Figure 8 This is a schematic diagram of Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0050] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0051] Embodiment 1:
[0052] like Figures 1 to 3 A security risk identification method based on deep learning and visual big model is shown, comprising the following steps:
[0053] Step S1: construct a safety risk image super-resolution model based on a super-resolution dataset, a multi-scale residual feature network, and a global spatiotemporal attention mechanism to generate a high-resolution safety risk image;
[0054] Constructing a security risk image super-resolution model includes the following steps:
[0055] Step S11: Collect and organize high-resolution images and public datasets in various scenarios as super-resolution image datasets;
[0056] Step S12: downsampling all original images in the super-resolution image dataset with different degradation factors based on the bicubic interpolation downsampling function to obtain low-resolution images of different sizes, i.e., super-resolution data pairs of different scales; in this embodiment, the degradation factor n (2, 4, 8) is used for downsampling;
[0057] That is, to create a super-resolution data set, the original HR data is preprocessed to obtain LR data;
[0058] Step S13: The low-resolution image and the high-resolution image are used to form a data pair for training a security risk image super-resolution model;
[0059] Step S14: Use the low-resolution image as the input of the security risk image super-resolution model, that is, the low-resolution security risk image, and extract shallow features through two 3×3 convolution layers; directly extract information from the low-resolution image as shallow features based on two 3×3 convolution kernels, and pass the obtained shallow features to the nonlinear mapping module to mine and extract deep features in the image.
[0060] Step S15: passing the extracted shallow features to the nonlinear mapping module of multi-scale residual feature extraction and global spatiotemporal attention mechanism to extract deep features;
[0061] In step S15, deep features in the image are mined and extracted based on the nonlinear mapping module, which specifically includes the following steps:
[0062] Step S15-1: Obtain local features in the low-resolution image; In step S15-1, local features in the low-resolution image are obtained, and a down-sampling operation is performed based on two residual blocks of 1×1 convolution and 3×3 convolution and a ReLU activation function to obtain local features in the low-resolution image; wherein the convolution kernel size is 4 and the step size is 2.
[0063] Step S15-2: Based on the Inception Depthwise Convolution model, i.e., the Inception module in the deep convolution network, a multi-scale residual feature extraction module is formed by combining multiple branches of small-size convolution kernels and large-size convolution kernels; the multi-scale residual feature extraction module operates on the local features of the input, keeps some channels unchanged, performs deep convolution operations on other channels, obtains multi-scale features, and then passes through the residual convolution block to fuse the acquired feature information; the residual convolution block is an important neural network module in deep learning to solve the problems of gradient disappearance and gradient explosion in deep neural networks, thereby improving the performance and training efficiency of the model; the residual convolution module includes multiple convolution layers, batch normalization layers and activation functions, and directly adds the input to the output through the residual connection. In this embodiment, the channel dimension is evenly divided into 4 branches to split the image channel. The first branch extracts features through a 3×3 depth-separable small convolution kernel. The second and third branches decompose the 11×11 large convolution kernel into 11×1 depth-separable convolution kernels and 1×11 depth-separable convolution kernels to speed up the network. The fourth branch directly concatenates each branch through the identity mapping to obtain multi-scale features, and finally obtains feature information through residual convolution block fusion.
[0064] Step S15-3: Combine the channel attention mechanism and the spatial attention mechanism into a global spatiotemporal attention mechanism; the channel attention mechanism uses the relationship between features to generate a spatial attention feature map, and each channel of the feature map is regarded as a feature detector. The channel features gather the specific content of useful information in the image. The spatial attention mechanism generates a spatial attention feature map by analyzing the relationship within the feature map, and the spatial attention focuses on the specific location of the effective information on the feature map;
[0065] Step S15-4: The input features are dimensionally transformed through the channel attention mechanism, and a double-layer multi-layer perceptron is used to amplify the channels across dimensions;
[0066] Step S15-5: After completing the cross-dimensional processing, restore to the original dimension; output the channel attention dimension map through the Sigmoid activation function;
[0067] Step S15-6: Reduce the number of image channels based on the first 7×7 convolution layer in the spatial attention mechanism, restore the number of image channels based on the second 7×7 convolution layer in the spatial attention mechanism, and use the Sigmoid activation function to output the spatial attention map to effectively fuse spatial information and obtain deep features.
[0068] Step S16: Based on sub-pixel convolution, the shallow features in step S14 and the deep features in step S15 are upsampled to reconstruct a high-resolution security risk image, so as to obtain a high-resolution security risk image as the output of the security risk image super-resolution model. Through the sub-pixel convolution operation, the pixels of the image in the feature map between different channels are rearranged, so that when the image size is increased, all image pixel information can be fully utilized, the appearance of invalid areas can be avoided, and the image detail information can be better preserved; this method is not easy to cause image distortion and blur, and it also solves the invalid areas generated by transposed convolution and deconvolution when the image size is enlarged.
[0069] An image super-resolution reconstruction model is constructed based on a multi-scale residual feature network and a global spatiotemporal attention mechanism to improve the image resolution in the field of security risk identification. It replaces the advanced designs such as residual structure and dense connection adopted by the existing convolutional neural network-based model. The existing model increases the depth of the network by indiscriminately stacking multiple identical modules to improve the reconstruction performance in some networks, which easily leads to feature map redundancy and low utilization. At the same time, the use of a single-size convolution kernel in the network limits the extraction of feature information, resulting in unsatisfactory reconstructed images. The algorithm of the present invention, based on a multi-scale residual feature network and a global spatiotemporal attention mechanism, can effectively fuse the extracted shallow and deep features while making full use of the multi-scale features of the security risk image, and better complete the image reconstruction task.
[0070] like Figure 4 As shown, step S2: generating a safety risk picture set based on the high-resolution safety risk image and the image-generated image model;
[0071] In step S2, a security risk picture set with various styles is generated, which specifically includes the following steps:
[0072] Step S21: Integrate the reconstructed high-resolution safety risk images into a high-resolution risk picture set, and based on the large-scale image-generated model, generate safety risk images with diverse styles and integrate them into a safety risk picture set with diverse styles; the large-scale image-generated model is based on the input prompt words and the safety risk reference picture, and performs fine adjustments and optimizations on the basis of the reference picture to quickly generate high-quality images; according to the failure of the prompt words, the background, color, style and light of the safety risk reference picture can be changed, thereby making the image more diverse and saving time costs.
[0073] Step S22: Integrate the high-resolution risk image set and the safety risk image set with diverse styles to form a safety risk image set.
[0074] Based on the image-generated image model, it is possible to generate security risk image data of different styles and backgrounds to expand the diversity of image data. This solves the problem that traditional image enhancement technologies, such as histogram equalization, Gaussian noise addition, non-mean filtering, etc., lack expressiveness, are difficult to cope with complex scenes, and have limited performance effects on specific tasks. The present invention is based on powerful image generation capabilities, efficient image conversion and style transfer capabilities, and generalization capabilities to achieve the expansion of the diversity of security risk images.
[0075] like Figure 6 As shown, step S3: the security risk picture set is based on the open source visual big model and LORA fine-tuning mechanism to build a security risk identification visual big model;
[0076] In step S3, a large visual model for security risk identification is constructed, which specifically includes the following steps:
[0077] Step S31: annotate the security risk picture set in step S2 using a picture annotation tool to obtain text question-answer pairs in the security risk pictures;
[0078] Step S32: Based on the open source visual big model, apply the LORA fine-tuning mechanism, iteratively train the model until the model converges; fuse and analyze the multimodal information such as images, sounds, and text in the video through the open source visual big model, i.e. the visual base big model, to achieve a comprehensive understanding of the video content; that is, extract features such as human posture, movements, and objects in the video through image recognition technology, extract voice information in the video through voice recognition, and extract text information in the video through natural language processing technology. The fusion and analysis of these multimodal information can further enrich the expression of the video content and improve the open source visual big model's ability to understand the video content; realize question and answer of the video content through the open source visual big model, apply the open source visual big model to the field of security risk identification, significantly improve the security risk identification and early warning capabilities, and further provide prevention and control measures.
[0079] Step S33: Based on the text questions and answers in the safety risk picture, the LORA weight file obtained by training and the weight file of the base visual large model are merged to obtain the safety risk identification visual large model.
[0080] In step S33, the LORA weight file and the weight file of the base visual large model are merged, and the formula for weight merging is:
[0081] h=Wx+BAx;
[0082] Among them, h is the weight parameter of the safety risk identification visual large model; W is the weight parameter of the base visual large model; BA is the weight parameter of LORA after training.
[0083] Based on the LOAR fine-tuning mechanism, a large visual model for security risk identification is constructed, which can identify abnormal behaviors of people in many scenarios such as hospitals, schools and commercial areas, such as sudden running, fighting or violent incidents, and issue timely warnings; the present invention does not require thousands of annotated images, but only a small number of image samples, and can complete vertical field fine-tuning in a short time, saving time costs.
[0084] like Figure 7 As shown, step S4: taking the natural scene picture with security risks as the input of the security risk identification visual big model, based on the standardized prompt engineering and intelligent agent strategy, the security risk identification visual big model generates warning and risk prevention and control measures;
[0085] In step S4, risk prevention and control measures are generated, which specifically include the following steps:
[0086] Step S41: using the pictures with security risks as the input of the security risk identification visual model; writing prompt words based on the Prompt project to stimulate the emergence ability of the security risk identification visual model, so that the security risk identification visual model has the ability to identify security risks in different scenarios; the prompt words in step S41 include roles and key points;
[0087] Step S42: The safety risk identification visual big model follows the standardized Prompt engineering instructions, combines the safety risk related knowledge learned during the training process, accurately identifies the danger signals in the environment, issues warnings, and gives specific risk prevention and control measures; the danger signals in step S42 include unsafe behaviors of people, unsafe states of objects, and potential safety risks in the environment. That is, the safety risk identification visual big model performs safety risk identification and analysis and outputs prevention and control measures.
[0088] Based on the standardized Prompt engineering and intelligent agent strategy, public scene pictures with safety risks are used as input to the risk identification visual big model, and the visual big model generates corresponding prevention and control measures, thereby reducing the occurrence of safety accidents.
[0089] Embodiment 2:
[0090] like Figure 5 As shown in the figure, establishing a safety risk picture set of fighting scenes specifically includes the following steps:
[0091] Step A1: Input a low-resolution fight image, and output a high-resolution fight image based on the safety risk image super-resolution model of the multi-scale residual feature network and the global spatiotemporal attention mechanism;
[0092] Step A2: Based on the large model of the image and the standard prompt words, generate multiple high-definition fighting images with anime style; the prompt words are "#Character, you are a professional painting master, your responsibility is to derive similar images with various styles based on the reference image. #Key points, based on the scene of two people fighting each other in the reference image, use your imagination to draw images of fighting in other scenes (such as in hospitals, schools, shopping malls, etc.), highlight the details of the fight, the image style is the style of anime characters, the image quality must be high-definition, and multiple images must be generated."
[0093] Step A3: Integrate the high-resolution fighting images generated by the safety risk image super-resolution model and the multiple fighting images of different styles generated by the image-to-image model to form a set of fighting safety risk images.
[0094] Embodiment three:
[0095] like Figure 8As shown in the figure, the safety risk identification visual large model can accurately identify the hidden safety risks in the environment. For example, in public scenes such as shopping malls, the safety risk identification visual large model can monitor whether there are dense crowds of people. If so, the safety risk identification visual large model will issue a warning of dense crowds and notify security personnel to take reasonable evacuation prevention and control measures to avoid safety accidents such as trampling, crowding and chaos. At the same time, it can monitor safety risks during production operations, such as workers not wearing safety helmets, not wearing safety belts when working at heights, and other potential safety risks, and can issue warnings in time to reduce the occurrence of safety accidents.
[0096] The intelligent agent for identifying and controlling the safety risks of crowd gatherings specifically includes the following steps:
[0097] Step B1: Input a picture of a crowd gathering on the street; trigger the safety risk identification visual large model in combination with a prompt word; the prompt word is "#Role, you are a street crowd safety risk identification master, your responsibility is to monitor whether the crowd on the street is gathering; #Key points, if you monitor the crowd gathering, please issue a warning in time to prevent safety accidents such as trampling, crowding, and traffic accidents, and generate prevention and control measures such as notifying the traffic police to evacuate the crowd, set up cordons, and slow down vehicles for relevant personnel to adopt";
[0098] Step B2: The safety risk identification model analyzes the content in the picture in detail and gives a risk warning, namely, "crowds gather in the middle of the street, which may lead to safety accidents such as crowding, trampling and traffic accidents."
[0099] Step B3: The large model for identifying safety risks outputs prevention and control measures for reference by monitoring personnel, i.e., “Please contact the traffic police as soon as possible to evacuate the crowd, urgent! urgent! urgent!”.
[0100] The image super-resolution algorithm based on the multi-scale residual feature network and the global spatiotemporal attention mechanism can generate a higher quality and more detailed safety risk image set to improve the image resolution, thereby assisting the fine-tuning training of the safety risk identification visual large model and mastering more image texture information.
[0101] By generating security risk images with diverse styles and backgrounds through the image-to-image large model, the diversity of data can be expanded, thereby improving the generalization ability of the security risk identification visual large model;
[0102] The large visual model for security risk identification built through the LORA fine-tuning mechanism has significantly improved the intelligence level of the monitoring system and has the ability to identify security risks in multiple scenarios.
[0103] Based on standardized prompt engineering and intelligent agent strategies, the visual large model for assisting safety risk identification generates detailed risk prevention and control measures. It has a certain degree of autonomy and intelligence, and continuously learns and adapts through interaction with the environment, effectively reducing the occurrence of safety accidents.
[0104] The present invention reduces the dependence of the safety risk monitoring system on humans and saves time costs; the large visual model for safety risk identification can automatically and accurately identify potential safety risks in a complex and dynamically changing natural environment, and conduct timely analysis, and ultimately provide prevention and control measures to reduce the occurrence of safety accidents.
[0105] The above implementation modes are not limitations of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by technicians in this technical field within the scope of the technical solution of the present invention also belong to the protection scope of the present invention.
Claims
1. A security risk identification method based on deep learning and visual big model, characterized in that: The following steps are involved: Step S1: construct a safety risk image super-resolution model based on a super-resolution dataset, a multi-scale residual feature network, and a global spatiotemporal attention mechanism to generate a high-resolution safety risk image; Step S2: Generate a safety risk picture set based on the high-resolution safety risk image and the image-generated large model; Step S3: The security risk image set is based on the open source visual big model and LORA fine-tuning mechanism to build a security risk identification visual big model; Step S4: Use the natural scene images with safety risks as the input of the safety risk identification visual big model. Based on the standardized prompt engineering and intelligent agent strategy, the safety risk identification visual big model generates warnings and risk prevention and control measures.
2. The security risk identification method based on deep learning and visual big model according to claim 1 is characterized by: The step S1 constructs a security risk image super-resolution model, which specifically includes the following steps: Step S11: Collect and organize high-resolution images and public datasets in various scenarios as super-resolution image datasets; Step S12: downsampling all original images in the super-resolution image dataset with different degradation factors based on the bicubic interpolation downsampling function to obtain low-resolution images of different sizes; Step S13: The low-resolution image and the high-resolution image are used to form a data pair for training a security risk image super-resolution model; Step S14: using the low-resolution image as the input of the security risk image super-resolution model, i.e., the low-resolution security risk image, and extracting shallow features through two 3×3 convolutional layers; Step S15: passing the extracted shallow features to the nonlinear mapping module of multi-scale residual feature extraction and global spatiotemporal attention mechanism to extract deep features; Step S16: Upsampling the shallow features in step S14 and the deep features in step S15 based on sub-pixel convolution to reconstruct a high-resolution security risk image, so as to obtain a high-resolution security risk image as an output of the security risk image super-resolution model.
3. The security risk identification method based on deep learning and visual big model according to claim 2 is characterized by: The step S15 mines and extracts deep features in the image based on the nonlinear mapping module, specifically comprising the following steps: Step S15-1: Acquire local features in the low-resolution image; Step S15-2: Based on the Inception Depthwise Convolution model, i.e., the Inception module in the deep convolution network, a multi-scale residual feature extraction module is formed by combining multiple branches of small-size convolution kernels and large-size convolution kernels; the multi-scale residual feature extraction module operates on the local features of the input, keeps some channels unchanged, performs deep convolution operations on other channels, obtains multi-scale features, and then passes through the residual convolution block to fuse the acquired feature information; Step S15-3: Combine the channel attention mechanism and the spatial attention mechanism into a global spatiotemporal attention mechanism; Step S15-4: The input features are dimensionally transformed through the channel attention mechanism, and a double-layer multi-layer perceptron is used to amplify the channels across dimensions; Step S15-5: After completing the cross-dimensional processing, restore to the original dimension; output the channel attention dimension map through the Sigmoid activation function; Step S15-6: Reduce the number of image channels based on the first 7×7 convolution layer in the spatial attention mechanism, restore the number of image channels based on the second 7×7 convolution layer in the spatial attention mechanism, and use the Sigmoid activation function to output the spatial attention map to effectively fuse spatial information and obtain deep features.
4. The security risk identification method based on deep learning and visual big model according to claim 3 is characterized by: In the step S15-1, local features in the low-resolution image are obtained, and a down-collection operation is performed based on two residual blocks of 1×1 convolution and 3×3 convolution and a ReLU activation function to obtain local features in the low-resolution image; The convolution kernel size is 4 and the stride is 2.
5. The security risk identification method based on deep learning and visual big model according to claim 1 is characterized by: The step S2 generates a security risk picture set with various styles, which specifically includes the following steps: Step S21: Integrate the reconstructed high-resolution safety risk images into a high-resolution risk picture set, and generate safety risk images with various styles based on the image-generated image macro model and integrate them into a safety risk picture set with various styles; Step S22: Integrate the high-resolution risk image set and the security risk image set with diverse styles to form a security risk image set.
6. The security risk identification method based on deep learning and visual big model according to claim 1 is characterized by: The step S3 constructs a large visual model for security risk identification, which specifically includes the following steps: Step S31: annotate the security risk picture set in step S2 using a picture annotation tool to obtain text question-answer pairs in the security risk pictures; Step S32: Based on the open source visual model, apply the LORA fine-tuning mechanism and iteratively train the model until the model converges; Step S33: Based on the text questions and answers in the safety risk picture, the LORA weight file obtained by training and the weight file of the base visual large model are merged to obtain the safety risk identification visual large model.
7. The security risk identification method based on deep learning and visual big model according to claim 6 is characterized by: In step S33, the LORA weight file and the weight file of the base visual large model are merged, and the formula for weight merging is: h=Wx+BAx; Among them, h is the weight parameter of the safety risk identification visual large model; W is the weight parameter of the base visual large model; BA is the weight parameter of LORA after training.
8. The security risk identification method based on deep learning and visual big model according to claim 1 is characterized by: The risk prevention and control measures generated in step S4 specifically include the following steps: Step S41: using the pictures with security risks as the input of the security risk identification visual model; writing prompt words based on the Prompt project to stimulate the emergence ability of the security risk identification visual model, so that the security risk identification visual model has the ability to identify security risks in different scenarios; Step S42: The safety risk identification visual large model follows the standardized Prompt engineering instructions and combines the safety risk-related knowledge learned during the training process to accurately identify dangerous signals in the environment, issue warnings, and provide specific risk prevention and control measures.
9. The method for identifying security risks based on deep learning and visual big models according to claim 8 is characterized in that: The prompt words in step S41 include roles and key points.
10. The security risk identification method based on deep learning and visual big model according to claim 9 is characterized in that: The danger signals in step S42 include unsafe behaviors of people, unsafe states of objects and potential safety risks in the environment.
Citation Information
Cited By
Intelligent agent-driven scheduling monitoring risk prediction and tracing method and system
CN121029473A