Low-illumination security detection device based on Attention and Retinex technologies

By adopting a low-light security detection device based on Attention and Retinex technology in the security monitoring system, the reflection and illumination components of video frames are decomposed and enhanced, and combined with the attention mechanism, the problem of image quality degradation in traditional systems under low light is solved, significantly improving the accuracy and efficiency of video analysis.

CN119693869AInactive Publication Date: 2025-03-25绍兴职业技术学院
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411713237.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The image quality of traditional security monitoring systems has decreased under low light conditions, resulting in a significant decline in the performance of target detection, tracking and recognition tasks.

Method used

Using a low-light security detection device based on Attention and Retinex technology, the video frame is decomposed into reflection components and illumination components by decomposing the network, and denoising and enhancing processing are performed separately. Combining the attention mechanism module and the reconstruction network, the accuracy and efficiency of video analysis are improved.

Benefits of technology

It significantly improves the accuracy and efficiency of video analysis in low-light environments, enhances the practicality and reliability of the security system, and maintains high detection accuracy and robustness under extremely poor lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693869A_ABST
    Figure CN119693869A_ABST
Patent Text Reader

Abstract

The invention discloses a low-illumination security and protection detection device based on Attention and Retinex technologies, belongs to the technical field of security and protection monitoring, and solves the problems that a traditional security and protection monitoring system is limited in performance under low illumination and often cannot effectively complete target monitoring and security and protection tasks. Comprising an input layer, a decomposition network, a reflection component denoising network, an illumination component enhancement network, an attention mechanism module, a reconstruction network and a target detection network, the input layer is used for receiving a low-illumination video frame from a monitoring camera, and the decomposition network is used for decomposing the input low-illumination video frame into a reflection component and an illumination component; the reflection component denoising network is used for carrying out denoising processing on reflection components, the illumination component enhancement network is used for carrying out brightness adjustment and contrast enhancement on illumination components, and the attention mechanism module is used for giving higher weights to important areas during feature calculation. According to the invention, the video analysis precision and efficiency in the low-light environment are improved, and the practicability and reliability of the security system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of security monitoring, and in particular to a low-light security detection device based on Attention and Retinex technologies. Background Art

[0002] The traditional security monitoring system refers to the use of video monitoring technology to monitor and record specific areas or places in real time, mainly through hardware facilities such as cameras, monitors, and recording equipment, combined with a security control center for centralized management. Its basic function is to obtain on-site video information in real time, help security personnel to detect abnormal situations in a timely manner, and then take countermeasures to ensure the safety of personnel and property. The traditional security monitoring system is generally composed of cameras, monitors, video recorders, signal transmission lines, storage devices, etc. The camera is responsible for collecting on-site image signals, the monitor is used to display the video screen in real time, and the recorder and storage device are used to record and save the monitoring screen for subsequent viewing and evidence collection. Traditional systems usually rely on analog signal transmission and local storage. Compared with modern digital and networked security systems, their data transmission and storage methods are relatively limited, and management and scheduling are relatively inflexible.

[0003] In terms of use, traditional security monitoring systems are mostly used in places such as banks, shopping malls, airports, transportation hubs, and residential areas to prevent crimes such as theft, vandalism, and intrusion. In some key areas, monitoring images can also be used as legal evidence to help solve cases. However, due to the limitations of hardware equipment, traditional systems have limited storage capacity and are not easy to expand, and their remote monitoring capabilities are weak, making them difficult to maintain and manage. With the development of technology, traditional security monitoring systems are gradually being replaced by new digital, intelligent, and networked systems.

[0004] However, due to the low cost and relatively stable functions of traditional security monitoring systems, traditional security monitoring systems are still widely used.

[0005] Traditional security monitoring systems perform well in well-lit environments, but in low-light conditions, due to the decline in image quality, the performance of tasks such as target detection, tracking and recognition often drops significantly. Specifically, in low-light conditions, the image quality of traditional security monitoring systems usually drops significantly, mainly because the image signal captured by the camera is weak due to insufficient light, which in turn affects subsequent tasks such as target detection, tracking and recognition. When the light is weak, the camera often automatically increases the exposure time or increases the sensitivity (ISO) to compensate for the insufficient light. Although these adjustments can improve the image brightness to a certain extent, they also introduce a lot of noise, especially in low-light environments. The increase in noise makes the image more blurred and details are lost, which in turn affects the accuracy of image processing and analysis. In addition, in low-light conditions, the image contrast is low, the distinction between the target and the background is insufficient, and the edges and contours become blurred, making it difficult to accurately identify and locate the target, especially in the target tracking process, the target is easily lost. Due to these factors, the error of the target detection algorithm in low-light environments increases, and the reliability and accuracy of recognition are significantly reduced. Therefore, traditional security monitoring systems are limited in their performance under low light conditions and often fail to effectively complete target monitoring and security prevention tasks.

[0006] To this end, a technical solution is needed that can effectively improve image quality and enhance detection accuracy in low-light environments.

[0007] Therefore, a low-light security detection device based on Attention and Retinex technology is proposed to solve or alleviate the above problems. Summary of the invention

[0008] The purpose of the present invention is to solve the shortcomings of the prior art and propose a low-light security detection device based on Attention and Retinex technology, aiming to improve the accuracy and efficiency of video analysis in low-light environments and enhance the practicality and reliability of the security system.

[0009] In order to achieve the above object, the present invention adopts the following technical solutions:

[0010] A low-light security detection device based on Attention and Retinex technology includes an input layer, a decomposition network, a reflection component denoising network, an illumination component enhancement network, an attention mechanism module, a reconstruction network, and a target detection network, wherein the input layer is used to receive a low-light video frame from a surveillance camera, the decomposition network is used to decompose the input low-light video frame into a reflection component and an illumination component, the reflection component denoising network is used to denoise the reflection component, the illumination component enhancement network is used to adjust the brightness and enhance the contrast of the illumination component, the attention mechanism module is used to give a higher weight to important areas when calculating features, the reconstruction network is used to recombine the denoised reflection component and the enhanced illumination component into an enhanced video frame, and the target detection network is used to detect target behavior on the enhanced video frame.

[0011] Preferably, it also includes an alarm module, which is used for triggering an alarm mechanism when a target detection network confirmation behavior occurs.

[0012] Preferably, the decomposition network is used to decompose the input low-light video frame into a reflectance component and an illumination component, comprising the following steps:

[0013] receiving an input low-light video frame;

[0014] The CNN network is used to extract features, and the PReLU activation function is used to achieve feature learning of low-light video frames;

[0015] The extracted feature map is transformed into the reflection component R using the convolution layer low and the illumination component I low ;

[0016] The reflected component R low and the illumination component I low Output separately.

[0017] Preferably, the PReLU activation function is Swish, the PReLU activation function is R(x)=x*sigmoid(x), and the decomposition network includes S(x,y)=R(x,y)·I(x,y), wherein S(x,y) is an image, R(x,y) is a reflection component, and I(x,y) is an illumination component.

[0018] Preferably, the decomposition network is used to decompose the input low-light video frame into a reflection component and an illumination component, and further comprises the following steps:

[0019] The extracted feature map is transformed into the reflection component R using the convolution layer low and the illumination component I low ;

[0020] The output is reflected by the loss function R low and the illumination component I low optimization.

[0021] Preferably, the loss function is L d =L r +λ ir L ir +λ is L is , where L r is the reconstruction loss, L ir is the constant reflectivity loss, L is is the smoothness loss, and λ ir , is They are the constant reflectivity L ir and smoothness loss L is The weight coefficient, the reconstruction loss Where LN is the low light (low) and normal light (normal) video frames, and the shared reflectivity loss L ir Used to constrain the consistency of reflectivity and share the reflectivity loss L ir =||R normal -R low ||, the smoothness loss L is =∑ i=LN ‖I i p(z=i||X,q)‖, under the smoothness loss L is Where p(z=i||X,q) represents the soft attention parameter, and its attention scoring function adopts a bilinear model Among them, W is a learnable network parameter.

[0022] Preferably, the illumination component enhancement network is used to perform brightness adjustment and contrast enhancement on the illumination component, and comprises the following steps:

[0023] The illumination component I low As input;

[0024] Downsampling is performed through a series of downsampling blocks consisting of convolution and PReLU activation functions to obtain a small-scale feature map;

[0025] Adjust the scale of the feature map by upsampling to reconstruct the local illumination distribution;

[0026] Concatenate the feature maps and connect them to the feature map of the final size;

[0027] Reduce the feature map channels to 3 channels;

[0028] The enhanced illumination component is reconstructed through convolution.

[0029] Preferably, the illumination component enhancement network is used to perform brightness adjustment and contrast enhancement on the illumination component, and further comprises the following steps:

[0030] Reconstruct the enhanced illumination component through convolution;

[0031] The enhanced illumination component is subjected to loss optimization, wherein the loss optimization includes enhanced image reconstruction loss, structure perception loss and color loss. The loss optimization L adjust =ωL c +L en +L is , where L c is the color loss, ω is the corresponding weight value, L en is the enhanced image reconstruction loss, the enhanced image reconstruction loss Among them, I n is the normal image illumination component, I en is the enhanced illumination component, For I en The gradient value of For I n The gradient value, the color loss L c =||F(S en )-F(S normal )||, where F(x) is the Gaussian blur operation, S en is the enhanced image, S normal This is an image of normal illumination.

[0032] Preferably, the attention mechanism module includes a channel attention module and a spatial attention module, and the attention mechanism module is used to give higher weights to important areas when calculating features, including the following steps:

[0033] The channel attention module performs global maximum pooling and global average pooling based on width and height on the input feature map F(H×W×C) to obtain two 1×1×C feature maps.

[0034] The two 1×1×C feature maps are fed into a two-layer neural network MLP respectively;

[0035] The features output by the neural network MLP are subjected to a sigmoid activation operation to generate the final channel attention feature map;

[0036] Perform element-wise multiplication on the channel attention feature map and the input feature map F to generate the input features required by the spatial attention module;

[0037] Use average pooling or maximum pooling to compress input features;

[0038] Generate a spatial weight map through a fully connected layer or a convolutional layer.

[0039] Preferably, the target detection network includes a feature extractor, a classifier and a bounding box regressor, and the feature extractor is a convolutional neural network based on the YOLOv9 algorithm.

[0040] The present invention has the following beneficial effects:

[0041] By integrating the Retinex-Net model and the attention mechanism, the present invention realizes the integrated processing of reflection component denoising, illumination component enhancement and target detection of low-light video streams, which significantly improves the security detection capability in low-light environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 It is a structural block diagram of the present invention.

[0044] 1. Input layer; 2. Decomposition network; 3. Reflection component denoising network; 4. Illumination component enhancement network; 5. Attention mechanism module; 6. Reconstruction network; 7. Target detection network. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0046] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0048] In the description of the present invention, it should be understood that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the product of the invention is conventionally placed when in use, or are the orientations or positional relationships conventionally understood by those skilled in the art. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0049] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0050] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0051] A low-light security detection device based on Attention and Retinex technology, such as Figure 1 As shown, it includes an input layer 1, a decomposition network 2, a reflection component denoising network 3, an illumination component enhancement network 4, an attention mechanism module 5, a reconstruction network 6, a target detection network 7, and an alarm module.

[0052] Input layer 1 is used to receive low-light video frames from surveillance cameras.

[0053] Decomposition network 2 is used to decompose the input low-light video frame into a reflection component and an illumination component. Decomposition network 2 inputs the low-light video frame, and decomposition network 2 outputs the reflection component and the illumination component. Decomposition network 2 is used to decompose the input low-light video frame into a reflection component and an illumination component, and includes the following steps:

[0054] receiving an input low-light video frame;

[0055] The CNN network is used to extract features, and the PReLU activation function is used to realize feature learning of low-light video frames. The PReLU activation function is Swish, and the PReLU activation function is R(x)=x*sigmoid(x). The decomposition network 2 includes S(x,y)=R(x,y)·I(x,y), where S(x,y) is the image, R(x,y) is the reflection component, and I(x,y) is the illumination component.

[0056] The extracted feature map is transformed into the reflection component R using the convolution layer low and the illumination component I low ;

[0057] The extracted feature map is transformed into the reflection component R using the convolution layer low and the illumination component I low ;

[0058] The output is reflected by the loss function R low and the illumination component I low Optimization, the loss function is L d =L r +λ ir L ir +λ is L is , where L r is the reconstruction loss, L ir is the constant reflectivity loss, L is is the smoothness loss, and λ ir , is They are the constant reflectivity L ir and smoothness loss L is The weight coefficient, reconstruction loss Where LN is the low light (low) and normal light (normal) video frames, and the shared reflectivity loss L ir Used to constrain the consistency of reflectivity and share the reflectivity loss L ir =||R normal -R low ||, smoothness loss L is =∑ i=LN ‖I i p(z=i||X,q)‖, under the smoothness loss L is Where p(z=i||X,q) represents the soft attention parameter, and its attention scoring function adopts a bilinear model Among them, W is the learnable network parameter;

[0059] The reflected component R low and the illumination component I low Output separately.

[0060] Decomposition network 2 uses a deep learning low-brightness image enhancement method to decompose the image into a reflection component and an illumination component, and processes these two components through a neural network to achieve image enhancement.

[0061] The reflection component denoising network 3 is used to denoise the reflection component. The reflection component denoising network 3 inputs the reflection component and outputs the denoised reflection component. The reflection component denoising network 3 includes a denoising convolution layer, a residual connection, etc.

[0062] De-noising is performed on the noise in the reflection component. Since the reflection component contains detailed information of the image, the denoising process needs to retain these details as much as possible while removing the noise. This can be achieved by designing a denoising convolutional layer and introducing a residual connection.

[0063] Reflection component denoising refers to the process of denoising the reflection component after decomposing the image into reflection component and illumination component. Since the reflection component contains the detailed information of the image, the denoising process needs to retain these details as much as possible while removing noise.

[0064] Reflection component denoising can be achieved through various image denoising algorithms, such as non-local mean denoising, BM3D denoising, deep learning denoising, etc. Among them, the deep learning method is used to denoise the reflection component, and the mapping relationship between noise and clean images can be learned through convolutional neural networks.

[0065] The illumination component enhancement network 4 is used to adjust the brightness and enhance the contrast of the illumination component. The illumination component enhancement network 4 inputs the illumination component and outputs the enhanced illumination component. The illumination component enhancement network 4 is used to adjust the brightness and enhance the contrast of the illumination component, and includes the following steps:

[0066] The illumination component I low As input;

[0067] A series of downsampling blocks consisting of convolution and PReLU activation functions are used to downsample the small-scale feature map to obtain large-scale illumination information.

[0068] With the help of large-scale illumination information, the feature map scale is adjusted by upsampling to reconstruct the local illumination distribution. The upsampling part consists of nearest neighbor interpolation and convolution operations.

[0069] Concatenate the feature maps and connect them to the feature map of the final size;

[0070] Reduce the feature map channels to 3 channels;

[0071] The enhanced illumination component is reconstructed through convolution, and the BM3D algorithm is used to denoise the image for the noise in the reflection image;

[0072] The enhanced illumination component is optimized for loss, including enhanced image reconstruction loss, structure perception loss and color loss. The loss optimization L adjust=ωL c +L en +L is , where L c is the color loss, ω is the corresponding weight value, L en To enhance the image reconstruction loss, enhance the image reconstruction loss Among them, I n is the normal image illumination component, I en is the enhanced illumination component, For I en The gradient value of For I n Gradient value, color loss L c =||F(S en )-F(S normal )||, where F(x) is the Gaussian blur operation, S en is the enhanced image, S normal This is an image of normal illumination.

[0073] The illuminance component enhancement network 4 is responsible for enhancing the illuminance component to improve the overall brightness of the image. The enhancement process may include operations such as brightness adjustment and contrast enhancement, aiming to improve the visual effect of the image. The enhancement network may include multiple convolutional layers and upsampling layers to learn the mapping relationship from low-brightness illuminance components to high-brightness illuminance components. Illuminance component enhancement refers to processing the illuminance component to improve the overall brightness of the image after decomposing the image into a reflection component and an illuminance component. The illuminance component represents the lighting conditions of the image, so enhancing the illuminance component can improve the visual effect of the image.

[0074] The attention mechanism module 5 is used to give higher weights to important areas when calculating features, and is used to calculate the weights of each part in the feature map and apply it to subsequent calculations. The attention mechanism module 5 inputs the feature map corresponding to the reflection component and the illumination component, and the attention mechanism module 5 outputs the weighted feature map. The attention mechanism module 5 includes a channel attention module and a spatial attention module. The attention mechanism module 5 is used to give higher weights to important areas when calculating features, and includes the following steps:

[0075] The channel attention module performs global maximum pooling and global average pooling based on width and height on the input feature map F(H×W×C) to obtain two 1×1×C feature maps.

[0076] The two 1×1×C feature maps are fed into a two-layer neural network MLP respectively;

[0077] The features output by the neural network MLP are subjected to a sigmoid activation operation to generate the final channel attention feature map;

[0078] Perform element-wise multiplication on the channel attention feature map and the input feature map F to generate the input features required by the spatial attention module;

[0079] Use average pooling or maximum pooling to compress input features;

[0080] Generate a spatial weight map through a fully connected layer or a convolutional layer.

[0081] By calculating the weights of each part of the feature map, the model can pay more attention to the important information areas. This helps improve the model's enhancement capabilities in low-light conditions.

[0082] The reconstruction network 6 is used to recombine the denoised reflection component and the enhanced illumination component into an enhanced video frame. The reconstruction network 6 inputs the denoised reflection component and the enhanced illumination component, and outputs the enhanced video frame. The reconstruction network 6 includes multiple convolutional layers, which are used to recombine the processed reflection component and illumination component into an enhanced image.

[0083] The reconstruction network 6 recombines the denoised reflection component and the enhanced illumination component into an enhanced video frame image. The reconstruction process needs to ensure the effective fusion of the reflection component and the illumination component to generate a high-quality enhanced image.

[0084] The target detection network 7 is used to detect target behavior on the enhanced video frame. The target detection network 7 inputs the denoised reflection component and the enhanced illumination component. The target detection network 7 outputs the target detection result (including target category, bounding box, etc.). The target detection network 7 includes a feature extractor, a classifier and a bounding box regressor. The feature extractor is a convolutional neural network based on the YOLOv9 algorithm.

[0085] Object detection is performed on the enhanced video frame. The object detection network 7 generally includes a feature extractor, a classifier, and a bounding box regressor to identify the target object in the image and determine its location and category. Since the input image has been enhanced, the performance of the object detection network 7 in low light conditions will be improved.

[0086] Object detection is an important task in computer vision, which aims to identify specific objects in images or videos and determine their locations and categories. Object detection usually includes steps such as candidate region generation, feature extraction, object classification, and bounding box regression.

[0087] When performing object detection on the enhanced image, a convolutional neural network based on the YOLOv9 algorithm is used to extract image features, and classifiers and regressors are used to determine the category and location of the object.

[0088] The alarm module is used by the target detection network 7 to confirm that the behavior has triggered the alarm mechanism.

[0089] For this device, the device significantly improves the video quality under low-light conditions. By introducing the Retinex decomposition network 2 and improving it with the soft attention mechanism, the video frame is decomposed into the reflection component and the illumination component, and denoising and enhancing are performed respectively. This method can more effectively improve the brightness and contrast of the video under low-light conditions, significantly improve the video quality, and provide better input for subsequent target detection tasks;

[0090] The device improves the accuracy and robustness of target detection. The lighting conditions and detail information of the enhanced video frames are significantly improved, which helps the target detection network 7 to more accurately identify the target object and judge its behavior. Even in extremely poor lighting conditions, the device of this patent can maintain high detection accuracy and robustness;

[0091] This device can realize real-time video processing and alarm, can process low-light video data in real time, and quickly identify target behaviors (such as climbing over guardrails). Once the target behavior is detected, the system can immediately trigger the alarm mechanism and promptly notify relevant personnel to handle it, effectively improving the response speed and accuracy of public safety monitoring;

[0092] This device can optimize resource allocation and improve processing efficiency. The attention mechanism module 5 is integrated into the enhancement network, which can optimize resource allocation according to the weight information of each part in the feature map. This means that during the processing, the model will allocate more computing resources to important information areas, thereby improving the enhancement effect of low-light images and ultimately improving the accuracy of target detection;

[0093] The device has high flexibility and scalability. By adjusting the network structure and training parameters, it can adapt to different application scenarios and lighting conditions. In addition, the device can be combined with other advanced image processing and object detection technologies to further improve its performance.

[0094] In addition, the device reduces the reliance on high-quality surveillance equipment. Traditional low-light video processing and target detection methods often rely on high-quality surveillance equipment to capture clear images. The device enhances and processes the video through deep learning algorithms, reducing the reliance on high-quality surveillance equipment, allowing effective monitoring and detection to be achieved in environments with limited resources or poor lighting conditions.

[0095] At the same time, this plan also provides a specific case, the case content is as follows:

[0096] At night or on a dimly lit street, a pedestrian attempts to climb over a guardrail. A nearby surveillance camera captures this action and transmits the video frame to the server at the monitoring center for processing.

[0097] The functions and processes of each module are as follows:

[0098] Input layer 1

[0099] Purpose: Receive low-light video frames from surveillance cameras.

[0100] Process: The surveillance camera captures street scenes in real time and transmits the captured video frames as data streams to the server in the monitoring center. The input layer 1 on the server receives these video frames and prepares them for subsequent processing.

[0101] Decomposition Network 2

[0102] Function: Decompose the input low-light video frame into reflection component and illumination component.

[0103] Process: The video frame transmitted from the input layer 1 first enters the Retinex decomposition network 2. The network uses a deep learning algorithm to decompose each pixel in the video frame into a reflection component that reflects the reflective characteristics of the object surface and an illumination component that describes the lighting conditions. These two components are respectively transmitted to the subsequent network modules for processing.

[0104] Reflection component denoising network 3

[0105] Function: De-noise the reflected component, removing noise while retaining details.

[0106] Process: After the reflection component enters the denoising network, the network denoises the reflection component through a series of convolutional layers, activation functions and other structures. By learning and optimizing network parameters, the denoising network can identify and remove the noise components in the reflection component while retaining useful information in the image, such as edges, textures and other details.

[0107] Illuminance component enhancement network 4

[0108] Function: Adjust brightness and enhance contrast of the luminance component.

[0109] Process: After the illumination component enters the enhancement network, the network improves the brightness level and contrast of the illumination component through a series of operations (such as brightness mapping, contrast stretching, etc.). These operations are designed to improve the lighting conditions of the video frame, making it brighter and clearer, which is conducive to subsequent object detection tasks.

[0110] Attention mechanism module 5

[0111] Function: Give important areas higher weights when calculating features.

[0112] Process: In the feature extraction or target detection stage, the attention mechanism module 5 optimizes resource allocation based on the weight information of each part of the feature map. For the behavior of climbing over the guardrail, the attention mechanism may focus more on the guardrail area and pedestrians, thereby improving the recognition ability of these key areas.

[0113] Reconstruction Network 6

[0114] Function: Recombine the denoised reflection component and the enhanced illumination component into an enhanced video frame.

[0115] Process: The reconstruction network 6 receives the processed reflection component and illumination component and reassembles them to generate an enhanced video frame. This process needs to ensure the consistency between the reflection component and the illumination component to maintain the visual coherence and authenticity of the video frame.

[0116] Object Detection Network7

[0117] Purpose: Detect target behavior (such as climbing over a guardrail) on enhanced video frames.

[0118] Process: The enhanced video frames are sent to the object detection network 7 for processing. The network uses deep learning algorithms to identify and locate objects in the video frames. In this case, the object detection network 7 will identify the pedestrian who climbed over the guardrail and give its location information (such as a bounding box). Once the behavior of climbing over the guardrail is detected, the system will trigger an alarm mechanism to notify relevant personnel to handle it.

[0119] Alarm module

[0120] Function: Once the target detection network 7 confirms that there is an act of climbing over the guardrail, the monitoring algorithm will immediately trigger the alarm mechanism.

[0121] Process: Alarm information can be sent to relevant personnel (such as security personnel, etc.) through sound, light signals, text messages, emails, etc., so that they can take timely measures to deal with it.

[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A low-light security detection device based on Attention and Retinex technology, characterized in that: The invention comprises an input layer (1), a decomposition network (2), a reflection component denoising network (3), an illumination component enhancement network (4), an attention mechanism module (5), a reconstruction network (6), and a target detection network (7), wherein the input layer (1) is used to receive low-light video frames from a surveillance camera, the decomposition network (2) is used to decompose the input low-light video frames into reflection components and illumination components, the reflection component denoising network (3) is used to denoise the reflection component, the illumination component enhancement network (4) is used to adjust the brightness and enhance the contrast of the illumination component, the attention mechanism module (5) is used to give higher weights to important areas when calculating features, the reconstruction network (6) is used to recombine the denoised reflection component and the enhanced illumination component into an enhanced video frame, and the target detection network (7) is used to detect target behavior on the enhanced video frame.

2. The low-light security detection device based on Attention and Retinex technology according to claim 1, characterized in that: It also includes an alarm module, which is used by the target detection network (7) to confirm that a behavior has occurred and triggered an alarm mechanism.

3. The low-light security detection device based on Attention and Retinex technology according to claim 1, characterized in that: The decomposition network (2) is used to decompose the input low-light video frame into a reflection component and an illumination component, comprising the following steps: receiving an input low-light video frame; The CNN network is used to extract features, and the PReLU activation function is used to achieve feature learning of low-light video frames; The extracted feature map is transformed into the reflection component R using the convolution layer low and the illumination component I low ; The reflected component R low and the illumination component I low Output separately.

4. The low-light security detection device based on Attention and Retinex technology according to claim 3, characterized in that: The PReLU activation function is Swish, the PReLU activation function is R(x)=x*sigmoid(x), and the decomposition network (2) includes S(x,y)=R(x,y)·I(x,y), wherein S(x,y) is an image, R(x,y) is a reflection component, and I(x,y) is an illumination component.

5. The low-light security detection device based on Attention and Retinex technology according to claim 1, characterized in that: The decomposition network (2) is used to decompose the input low-light video frame into a reflection component and an illumination component, and further comprises the following steps: The extracted feature map is transformed into the reflection component R using the convolution layer low and the illumination component I low ; The output is reflected by the loss function R low and the illumination component I low optimization.

6. The low-light security detection device based on Attention and Retinex technology according to claim 5, characterized in that: The loss function is L d =L r +λ ir L ir +λ is L is , where L r is the reconstruction loss, L ir is the constant reflectivity loss, L is is the smoothness loss, and λ ir , is They are the constant reflectivity L ir and smoothness loss L is The weight coefficient of the reconstruction loss L r =∑ i=LN ∑ j=LN λ ij ‖R i °I j -S j ‖, where LN is the low light (low) and normal light (normal) video frames, sharing the reflectivity loss L ir Used to constrain the consistency of reflectivity and share the reflectivity loss L ir =||R normal -R low ||, the smoothness loss L is =∑ i=LN ‖I i p(z=i||X,q)‖, under the smoothness loss L is Where p(z=i||X,q) represents the soft attention parameter, and its attention scoring function adopts a bilinear model Among them, W is a learnable network parameter.

7. The low-light security detection device based on Attention and Retinex technology according to claim 1, characterized in that: The illumination component enhancement network (4) is used to adjust the brightness and enhance the contrast of the illumination component, and comprises the following steps: The illumination component I low As input; Downsampling is performed through a series of downsampling blocks consisting of convolution and PReLU activation functions to obtain a small-scale feature map; Adjust the scale of the feature map by upsampling to reconstruct the local illumination distribution; Concatenate the feature maps and connect them to the feature map of the final size; Reduce the feature map channels to 3 channels; The enhanced illumination component is reconstructed through convolution.

8. The low-light security detection device based on Attention and Retinex technology according to claim 7, characterized in that: The illumination component enhancement network (4) is used to adjust the brightness and enhance the contrast of the illumination component, and further comprises the following steps: Reconstruct the enhanced illumination component through convolution; The enhanced illumination component is subjected to loss optimization, wherein the loss optimization includes enhancing image reconstruction loss, structure perception loss and color loss. The loss optimization L adjust =ωL c +L en +L is , where L c is the color loss, ω is the corresponding weight value, L en is the enhanced image reconstruction loss, the enhanced image reconstruction loss Among them, I n is the normal image illumination component, I en is the enhanced illumination component, For I en The gradient value of For I n The gradient value, the color loss L c =||F(S en )-F(S normal )||, where F(x) is the Gaussian blur operation, S en is the enhanced image, S normal This is an image of normal illumination.

9. The low-light security detection device based on Attention and Retinex technology according to claim 1, characterized in that: The attention mechanism module (5) includes a channel attention module and a spatial attention module. The attention mechanism module (5) is used to give a higher weight to important areas when calculating features, and includes the following steps: The channel attention module performs global maximum pooling and global average pooling based on width and height on the input feature map F(H×W×C) to obtain two 1×1×C feature maps. The two 1×1×C feature maps are fed into a two-layer neural network MLP respectively; The features output by the neural network MLP are subjected to a sigmoid activation operation to generate the final channel attention feature map; Perform element-wise multiplication on the channel attention feature map and the input feature map F to generate the input features required by the spatial attention module; Use average pooling or maximum pooling to compress input features; Generate a spatial weight map through a fully connected layer or a convolutional layer.

10. The low-light security detection device based on Attention and Retinex technology according to claim 1, characterized in that: The target detection network (7) comprises a feature extractor, a classifier and a bounding box regressor, wherein the feature extractor is a convolutional neural network based on the YOLOv9 algorithm.