AI barrier gate monitoring system based on video image analysis
By introducing a multi-scale evaluation mechanism and residual blocks into the image restoration system, the problem of incoherence of image processing levels in the prior art is solved, and the accuracy and detailed expression of image restoration are significantly improved, achieving higher quality image restoration effect.
Patent Information
- Application Number
- CN202411993711.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When handling image restoration tasks in complex environments, the prior art fails to effectively connect and closely combine image processing at each level, resulting in the generated images lacking a sense of realism in local details and making it difficult to capture fine structures and textures.
A multi-scale evaluation mechanism is used to comprehensively evaluate image features, ensuring the close connection from global to local and then to deep training, and alleviate the problem of gradient disappearance in the deep network through residual blocks, improving information transmission efficiency and learning ability of fine-grained features.
The accuracy and detail expressiveness of image restoration are significantly improved, and the generated images are at the best state at both the macro and micro levels, improving the overall quality and reliability of image restoration.
Smart Images

Figure CN119904778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video image analysis, and in particular to an AI barrier gate monitoring system based on video image analysis. Background Art
[0002] In the intelligent traffic management system, the gate monitoring system plays a vital role, especially in vehicle traffic management and safety monitoring. To ensure the efficient operation of the system, the clarity and accuracy of the video image are crucial. Due to environmental factors (such as rainy days, foggy days, and low light conditions), it is difficult for the camera lens to focus accurately under low visibility conditions, resulting in out-of-focus blur in the image; at the same time, the rapid movement of vehicles or pedestrians in these adverse weather conditions, coupled with the extended exposure time of the camera to obtain sufficient light, further exacerbates the problem of motion blur. These problems seriously affect the performance and reliability of the gate monitoring system.
[0003] Traditional image restoration methods can usually process images well in the whole or in part, but when dealing with image restoration tasks in complex environments, they fail to effectively connect and closely combine image processing at all levels, resulting in unsatisfactory performance. Specifically, there is an obvious gap between the restoration of image features from the global to the local and then to the deep training, which makes the generated images look realistic when presented, but lack of realism in local details, and it is difficult to capture subtle structures and textures.
[0004] System Contents
[0005] The purpose of the present invention is to provide an AI gate monitoring system based on video image analysis to solve the image restoration problem caused by the failure to effectively connect and closely combine image processing at various levels in the prior art. Specifically, a multi-scale evaluation mechanism is used to comprehensively evaluate image features at different levels to ensure a close connection from global to local to deep training; at the same time, a residual block is used to alleviate the gradient vanishing problem in the deep network, improving the efficiency of information transmission and the learning ability of fine-grained features.
[0006] The above-mentioned AI barrier monitoring system includes a video extraction module and a definition abnormality diagnosis module. The video extraction module is used to extract images frame by frame from the video stream to obtain image frames. The definition abnormality diagnosis module identifies the image frames and marks the image frames with definition abnormalities. It is characterized in that it also includes:
[0007] The generative adversarial network module includes a multi-scale discriminator, a generator and a discriminator. The multi-scale discriminator simultaneously evaluates image frames with clarity anomalies at different scales to help the generator learn more complex mapping relationships in microscopic details. The generator restores image frames with clarity anomalies based on a deep network to obtain restored image frames. There is a customized loss function between the generator and the discriminator to guide the generator to gradually improve the quality of the output image frames.
[0008] Residual blocks allow information to be passed directly across multiple layers, enabling the generator to capture multi-level image features to alleviate the vanishing gradient problem in deep networks;
[0009] as well as,
[0010] The decision control module makes decisions based on the image frames output by the generator and controls the gate to take action.
[0011] As a further improvement of the technical solution, the multi-scale discriminator includes multiple evaluation sub-modules, and the evaluation sub-modules are used to evaluate image quality at different levels and capture image features at different scales.
[0012] As a further improvement of this technical solution, after the multi-scale discriminator evaluates the image quality at different scales, it passes part of the evaluation results to the attention mechanism. These evaluation results contain information about the global structure and local details.
[0013] As a further improvement of the present technical solution, an attention mechanism is used to dynamically adjust the feature map weights according to the feedback information provided by the multi-scale discriminator to highlight the key visual areas. The attention mechanism includes multiple attention units, each of which is used to identify and enhance important local features in the image, so that the restoration process focuses on the key areas.
[0014] As a further improvement of this technical solution, the generator adopts an encoding-decoding architecture such as U-Net or ResNet combined with skip connections to effectively transmit fine-grained features. The skip connection is used to connect the corresponding layers in the encoder and decoder to ensure the effective transmission of low-level feature information and help the model learn how to map from blurred images to clear images.
[0015] As a further improvement of the present technical solution, customized loss functions include adversarial loss, content loss, perceptual loss, and temporal consistency loss. The customized loss function is used to guide the learning process of the generative adversarial network module based on the evaluation results of the multi-scale discriminator and the learning status of the residual block.
[0016] As a further improvement of the present technical solution, the adversarial loss includes a generator loss and a discriminator loss, which are used to measure the difference between the generated image and the real image; the generator loss optimizes the generator to make the generated image closer to the real image, and the discriminator loss optimizes the discriminator to improve its ability to distinguish between the real image and the generated image;
[0017] Content loss includes pixel-level loss and feature-level loss, which are used to maintain the content structure of the generated image; pixel-level loss ensures that the generated image is consistent with the original image at the pixel level, and feature-level loss ensures that the generated image is consistent with the original image in terms of high-level feature representation;
[0018] Perceptual loss extracts high-level semantic feature loss through the pre-trained model to capture high-level semantic features in the generated image. High-level semantic feature loss compares the feature representations of the generated image and the real image at different layers of the pre-trained model to ensure that the generated image contains correct semantic information.
[0019] The temporal consistency loss is used to ensure the coherence of the generated images in the temporal sequence; the temporal consistency loss calculates the temporal dependencies between adjacent frames so that the generated images are visually consistent between consecutive frames.
[0020] As a further improvement of the present technical solution, the residual block specifically includes a plurality of residual units, each of which is used to allow information to be directly transmitted across multiple layers and includes a jump connection to facilitate the learning of complex mapping relationships.
[0021] As a further improvement of the present technical solution, the clarity anomaly diagnosis module includes a preprocessing submodule for performing pre-normalization and noise removal operations on images extracted frame by frame from the video stream to improve the accuracy of subsequent evaluation.
[0022] As a further improvement of the present technical solution, the clarity abnormality diagnosis module adopts a square gradient method based on a focus window mode to diagnose clarity abnormalities.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] 1. In this AI gate monitoring system based on video image analysis, the accuracy and detail expression of image restoration are significantly improved by introducing a multi-scale discriminator. Specifically, the working mechanism of the multi-scale discriminator is that it can dynamically adjust the weights of features at different levels to more accurately reflect the authenticity and complexity of the image. When evaluating an image, it not only considers the similarity of the overall structure, but also deeply analyzes the realism of local details. This multi-scale evaluation mechanism helps the generator in the generative adversarial network learn more complex mapping relationships, promotes the learning of fine-grained features, and enables the generator to generate more realistic images, especially when dealing with image restoration tasks in complex scenes and harsh environments. In addition, the rich feedback information provided by the multi-scale discriminator guides the generator to optimize image quality at different scales, ensuring that the generated image is in the best state at both the macro and micro levels, thereby significantly improving the overall quality and reliability of image restoration.
[0025] 2. In this AI gate monitoring system based on video image analysis, an efficient closed-loop control system is constructed by closely combining the generative adversarial network module, attention mechanism and customized loss function, which significantly improves the overall quality of image restoration and system stability. The generator and discriminator in the generative adversarial network module continuously optimize the image restoration effect through adversarial training. The generator receives feedback information from other modules and gradually improves the quality of the output image, making it more realistic and rich in details; the attention mechanism dynamically adjusts the feature map weights according to these feedback information, highlights the key visual areas, and ensures that the restoration process focuses more on important local features such as edges and textures, thereby improving the restoration accuracy; the customized loss function combines multiple loss terms to accurately guide the learning process of the generative adversarial network, ensuring that the generated image reaches the best state in terms of global structure, semantic consistency and temporal coherence. This collaborative working mode enables the system to not only improve the accuracy of global and local features when dealing with image restoration tasks in complex environments, but also ensure the consistency and coherence of images in time series, forming a continuously improved closed-loop control mechanism, which significantly enhances the stability and reliability of the gate monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flow chart of the AI barrier monitoring system based on video image analysis of the present invention;
[0027] Figure 2 This is a schematic diagram of the process flow of the generative adversarial network module of the present invention;
[0028] Figure 3 It is a schematic diagram of the customized loss function process of the present invention.
[0029] The meaning of each number in the figure is:
[0030] Among them: 100, video extraction module; 200, clarity abnormality diagnosis module; 300, generative adversarial network module; 400, decision control module. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0032] At the same time, some technical terms are explained here:
[0033] Among them, GAN refers to the generative adversarial network module;
[0034] Out-of-focus blur refers to the phenomenon that objects in an image appear blurry because the camera lens fails to focus on the subject properly;
[0035] Motion blur refers to the phenomenon that the outline of an object in the image appears blurred because the object moves relative to the camera during the exposure time.
[0036] See also Figure 1 As shown, an AI gate monitoring system based on video image analysis is provided, which aims to solve the image quality problems caused by environmental factors such as defocus blur and rainy days. Specifically, the clarity and reliability of the video monitoring system are improved through the clarity abnormality diagnosis module 200, the generative adversarial network module 300, and the decision control module 400.
[0037] First, the video extraction module 100 extracts images from the video stream frame by frame, and the clarity abnormality diagnosis module 200 monitors each frame of the image in real time, detects and marks the image areas with clarity abnormalities (such as defocus blur or motion blur). This process not only includes extracting images frame by frame from the input video stream and performing necessary preprocessing operations, such as normalization and noise removal, but also uses the gradient value to reflect the grayscale change rate of the image, and evaluates the overall clarity level of the image by calculating the square gradient. When the square gradient is lower than the set threshold, the image is considered to have clarity abnormalities. Furthermore, the module will analyze the cause of the abnormality and distinguish whether it is defocus blur or motion blur (other types of blur are not excluded), so as to provide accurate guidance for subsequent repairs.
[0038] At present, image clarity evaluation methods are generally divided into frequency domain and spatial domain methods. These methods can basically distinguish whether an image is blurred or not under normal imaging environment and noise stability, but they differ in speed and accuracy. In order to overcome the limitations of the above methods, this embodiment adopts an improved square gradient method, that is, a square gradient algorithm based on a focusing window mode to diagnose clarity abnormalities. This method can effectively overcome the disadvantage of large amount of calculation, and performs well in distinguishing the degree of image clarity, taking into account accuracy and real-time performance. Specifically, f(x, y) represents a digital image, and the square gradient of the image is the sum of squared grayscale differences, which can be expressed as:
[0039]
[0040] In the formula, F sq-grad is the square gradient value of the image, which reflects the grayscale change rate of the image in space. When the image clarity is not enough, the square gradient value of the image will decrease;
[0041] f(x, y) represents the grayscale value of the pixel at position (x, y) in the image, where x and y are the coordinates of the pixel;
[0042] M and N represent the total number of rows and columns of the image, respectively, and X and Y represent the row and column coordinates of the image, respectively;
[0043] For a specific video shot by a camera in a certain system, extract the video frame and perform image analysis on it. Since the imaging resolution is certain, the grayscale change rate of a clear image that meets the system monitoring quality requirements is also within a certain range. Through multiple experiments, we can derive a threshold (generally, the threshold range is about 100-500). When the grayscale change rate of the image being diagnosed is closer to this threshold, it means that its clarity is better.
[0044] Through the data obtained from the clarity anomaly diagnosis, the system can identify and mark blurry or out-of-focus image frames. These marked image frames are used as input data for training the GAN model, and the corresponding normal and clear image frames are used as target outputs.
[0045] In order to achieve more accurate image restoration and higher overall quality, attention mechanism and customized loss function are further applied on this basis to optimize the restoration effect. The attention mechanism adjusts the weights according to the diagnosis results, so that the model focuses more on repairing those key areas and improves the restoration accuracy. The customized loss function combines multiple objective items such as adversarial loss, content loss, perceptual loss, and temporal consistency loss to ensure that the generated image is optimal in both details and overall quality. Finally, the processed clear image is passed to the decision control module 400 to determine whether the vehicle is allowed to pass and control the gate action accordingly. The entire system forms a closed-loop control system, combining clarity anomaly diagnosis and image restoration technology to automatically detect problems and correct them immediately, forming a continuous improvement cycle to ensure that the AI gate monitoring system can operate stably in severe weather (such as rainy and foggy days) and provide high-quality services.
[0046] like Figure 2 As shown, in order to more effectively process these images marked as abnormal in clarity, the system adopts the generative adversarial network module 300 technology, in which the generator G and the discriminator D continuously optimize the image restoration effect through adversarial training. Specifically, the generator adopts an encoding-decoding architecture such as U-Net or ResNet combined with jump connections. This architecture can effectively transmit fine-grained features and help the model learn how to map from blurry images to clear images. The adversarial loss function between the generator and the discriminator is used to guide the generator to gradually improve the quality of the output image, making it more realistic and rich in details. The adversarial loss function between the generator and the discriminator is defined as follows:
[0047]
[0048] x1 is from the real data distribution P data (x1) clear image sample;
[0049] z is a random noise vector following distribution P z (z), min G max D Represents a minimum-maximum optimization problem, that is, finding the optimal generator G and discriminator D;
[0050] V(D, G) is the game value or loss function between the discriminator and the generator;
[0051] E is the expectation operator;
[0052] X~P data (x) indicates that the sample x comes from the real data distribution P data ;
[0053] logD(x) represents the logarithm of the output probability of the discriminator D for the true sample x.
[0054] The task of the generator is to transform the noise vector z into an image G that is as realistic as possible. (z) , while the discriminator D tries to distinguish between the real image x and the generated image G (z) .
[0055] In order to more effectively improve the ability to reconstruct details, especially when dealing with subtle structures and textures, we introduced multi-scale discriminators and residual blocks in the generative adversarial network module 300 to enhance the image restoration effect of the system and address the challenges in deep network training.
[0056] First, the introduction of the multi-scale discriminator enables the system to evaluate the authenticity of images at multiple scales. The discriminator in traditional GANs usually evaluates images at only one scale, which may cause the generated images to appear realistic in global structure but lack realism in local details. With the multi-scale discriminator, the system can evaluate images at different scales simultaneously, ensuring that the generated images are not only accurate in macroscopic structure but also excellent in microscopic details. This multi-scale evaluation mechanism helps the generator learn more complex mapping relationships, thereby improving the quality of image restoration.
[0057] Secondly, the application of residual blocks effectively alleviates the gradient vanishing problem in deep networks. In deep neural networks, as the number of network layers increases, the gradient vanishing problem is prone to occur during training, making it difficult for the model to learn effective feature representations. Residual blocks allow information to be directly transmitted across multiple layers, so that deep networks can also be effectively trained to capture more levels of image features. This is especially important for image restoration tasks, because by retaining more low-level features (such as edges, textures), the generator can generate more realistic images, especially for scenes with rich details.
[0058] Combining the multi-scale discriminator and residual blocks, our GAN architecture is not only able to generate high-quality clear images, but also performs well in dealing with complex scenes. The multi-scale discriminator provides rich feedback information to guide the generator to optimize image quality at different scales; while the residual block promotes the learning of fine-grained features, ensuring that the generated images are optimal in both details and overall quality.
[0059] Although GAN can generate realistic images as a whole, it may be blurred or distorted when processing local details, especially in complex scenes. To compensate for this shortcoming, the spatial attention module (SAM) and channel attention module (CAM) can be introduced into the generator. SAM can dynamically assign different weights to the feature map on the channel at each position, thereby highlighting important visual information. For each pixel position i, a weight A is calculated. s (i), the weight reflects the importance of the position. This process can be achieved through convolution operation:
[0060] A s =σ(f(Conv(X)));
[0061] A s is the output activation value, usually representing the activation value at a specific spatial position s;
[0062] f is a function, usually representing some additional processing steps;
[0063] Conv is a convolution operation, which is the core component of convolutional neural network;
[0064] X is the input data, which can be an image, the output of the previous layer, or other forms of data.
[0065] CAM adjusts the importance of each channel based on the global context information, strengthens the features that help restore clarity, and calculates the importance weight A of each channel. c (c), where c represents the channel index, which can be achieved by global average pooling (GAP):
[0066] A C =σ(f(MLP(GAP(X1))));
[0067] A c is the final activation value or output value;
[0068] σ is an activation function, which is used to introduce nonlinear characteristics into the model and usually represents the activation value on a certain context or channel;
[0069] MLP is a Multi-Layer Perceptron, a fully connected neural network;
[0070] GAP is Global Average Pooling, a pooling operation;
[0071] X1 is the input data, which is an image, the output of the previous layer, or other forms of data. For convolutional neural networks, it is usually three-dimensional. These mechanisms help the model focus more on those parts that need to be repaired most, such as edges, textures and other important details, improve the repair accuracy, and reduce unnecessary waste of computing resources.
[0072] Standard GAN training relies on a simple adversarial loss, but this may not be enough to ensure high-quality performance of generated images in specific application scenarios. Therefore, in order to better guide the learning process of the model and ensure that the generated images meet the expected application requirements, the present invention designs a variety of customized loss functions, such as Figure 3 As shown, the content loss is first cited:
[0073] L content (G,x2,y2)=||G(x2)-y2||1;
[0074] L content It is a content loss function, which is used to measure the difference in content between the image generated by the generator G and the real image;
[0075] x2 is the input data, usually random noise or some form of low-level representation, used by the generator G to generate images;
[0076] y2 is the real image, that is, the target image generated by the expected generator G;
[0077] G(x2) is the output of the generator G for the input data x2, that is, the generated image, which aims to preserve the main structure and semantic information of the original image.
[0078] Secondly, perceptual loss is introduced:
[0079] L perceptual (G,x3,y3)=||φ(G(x3))-φ(y3)||2;
[0080] L perceptual It is a perceptual loss function, which is used to measure the difference between the image generated by the generator G and the real image in terms of high-level features;
[0081] A pre-trained feature extractor (such as the VGG network) is introduced as φ to measure the similarity between the generated image and the real image in high-level visual features.
[0082] A temporal consistency loss is also used:
[0083] L temporal (G,x t , x t-1 ,y t ,y t-1 )=||G(x t )-G(xt-1) )-(y t -y t-1 )||2;
[0084] L temporal It is a temporal consistency loss function, which is used to measure the temporal differences of the image sequences generated by the generator G;
[0085] x t is the input data at the current time step t, usually random noise or some form of low-level representation;
[0086] x t-1 is the input data of the previous time step t-1, which is also random noise or some form of low-level representation;
[0087] y t is the real image at the current time step t, that is, the target image generated by the expected generator G;
[0088] y t-1 is the real image at the previous time step t-1, that is, the target image expected to be generated by the generator G, which is used to encourage consistent change patterns between adjacent frames.
[0089] Finally, the attention-guided loss is introduced to ensure that the model learns effective attention distribution, avoids overfitting a certain type of sample, and promotes the generation of more diverse images. Combining all the above loss terms, the total loss function of the generator can be expressed as:
[0090] L G =λ1L GAN (G,D)+λ2L content (G,x2,y2)+λ3L perceptual (G,x3,y3)+λ4L temporal (G,x t ,x t-1 ,y t ,y t-1 )+λ5L attention ;
[0091] Here, λ1, λ2, λ3, λ4, and λ5 are the weight coefficients of each loss term, which are used to balance the importance of different losses.
[0092] The high-definition images processed through the above steps will be returned to the decision control module 400 of the AI barrier monitoring system. These high-definition images provide reliable data support for subsequent functions such as license plate recognition and pedestrian detection, allowing the system to make more accurate traffic judgments and control the movement of the barrier accordingly. In addition, the system will automatically adjust parameter settings according to the quality of the generated images, forming a self-optimizing closed-loop mechanism to ensure stable operation and provide efficient services in various complex environments.
[0093] The present invention constructs an efficient closed-loop control system by closely combining the generative adversarial network module 300, the attention mechanism and the customized loss function with the multi-scale discriminator and the residual block. Specifically, the multi-scale discriminator enhances the ability of GAN to evaluate the authenticity of images at multiple scales, ensuring that the generated images are not only realistic in global structure, but also rich in local details; the residual block alleviates the gradient vanishing problem in the deep network and promotes the learning of complex mapping relationships. The attention module uses the multi-scale feedback information provided by the multi-scale discriminator to dynamically adjust the feature map weights, highlight key visual information, and improve the restoration accuracy; the customized loss function combines the evaluation results of the multi-scale discriminator to accurately guide the model learning process and ensure the quality and coherence of the generated images. This innovative combination enables the system to provide high-quality image restoration results when processing clarity anomalies in video images, and automatically adjusts parameters to adapt to environmental changes, forming a self-optimizing closed-loop control mechanism, which significantly improves the stability and reliability of gate monitoring in intelligent traffic management systems.
[0094] In summary, this paper introduces an AI barrier monitoring system based on video image analysis, which effectively solves the image quality problem caused by environmental factors by introducing advanced image restoration technology, greatly improving the ability and efficiency of intelligent traffic management. Ultimately, the system can not only make significant progress in dealing with image blur, but also provide high-quality image restoration results in complex scenes, ensuring the accuracy, reliability and response speed of the intelligent traffic management system.
[0095] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. An AI gate monitoring system based on video image analysis, comprising a video extraction module (100) and a definition abnormality diagnosis module (200), wherein the video extraction module (100) is used to extract images frame by frame from a video stream to obtain image frames, and the definition abnormality diagnosis module (200) identifies the image frames and marks the image frames that will have definition abnormalities, characterized in that: Also includes: A generative adversarial network module (300), comprising a multi-scale discriminator, a generator and a discriminator, wherein the multi-scale discriminator simultaneously evaluates image frames with clarity anomalies at different scales to help the generator learn more complex mapping relationships in terms of microscopic details; The generator restores image frames with abnormal clarity based on a deep network to obtain restored image frames. There is a customized loss function between the generator and the discriminator to guide the generator to gradually improve the quality of the output image frames. Residual blocks, which allow information to be passed directly across multiple layers, enabling the generator to capture multiple layers of image frames to alleviate the vanishing gradient problem in deep networks; as well as, A decision control module (400) makes a decision based on the image frame output by the generator and controls the gate to move.
2. The AI barrier gate monitoring system based on video image analysis according to claim 1 is characterized in that: The multi-scale discriminator evaluates image frames at different levels through multiple evaluation submodules, specifically including a low-resolution submodule evaluating global structural features, a medium-resolution submodule evaluating intermediate-level features, and a high-resolution submodule evaluating local detail features.
3. The AI barrier gate monitoring system based on video image analysis according to claim 2 is characterized in that: After evaluating the image frame at different scales, the multi-scale discriminator passes the portion of the image frame containing global structure and local details to the attention mechanism.
4. The AI barrier monitoring system based on video image analysis according to claim 3 is characterized in that: The attention mechanism is used to dynamically adjust the feature map weights according to the image frames provided by the multi-scale discriminator to highlight the key visual areas. The attention mechanism is used to identify and enhance important local features in the image so that the restoration process focuses on the key areas.
5. The AI barrier monitoring system based on video image analysis according to claim 1 is characterized in that: The generator adopts an encoding-decoding architecture such as U-Net or ResNet combined with jump connections to effectively transfer fine-grained features. The jump connections are used to connect corresponding layers in the encoder and decoder to ensure the effective transfer of low-level feature information.
6. The AI barrier gate monitoring system based on video image analysis according to claim 3 is characterized in that: The customized loss function includes adversarial loss, content loss, perceptual loss, and temporal consistency loss. The customized loss function is used to guide the learning process of the generative adversarial network module (300) according to the image frames provided by the multi-scale discriminator and the residual block.
7. The AI barrier gate monitoring system based on video image analysis according to claim 6 is characterized in that: The adversarial loss includes a generator loss and a discriminator loss, which is used to measure the difference between the generated image and the real image; The generator loss optimizes the generator to make the generated images closer to the real images, while the discriminator loss optimizes the discriminator to improve its ability to distinguish between real and generated images; The content loss includes pixel-level loss and feature-level loss, which are used to maintain the content structure of the generated image; the pixel-level loss ensures the consistency of the generated image with the original image at the pixel level, and the feature-level loss ensures the consistency of the generated image with the original image in terms of high-level feature representation; The perceptual loss extracts high-level semantic feature loss through the pre-trained model, which is used to capture high-level semantic features in the generated image; Semantic feature loss ensures that the generated image contains correct semantic information by comparing the feature representations of the generated image and the real image at different layers of the pre-trained model; The temporal consistency loss is used to ensure the coherence of the generated image in the time sequence; the temporal consistency loss calculates the temporal dependency between adjacent frames so that the generated image is visually consistent between consecutive frames.
8. The AI barrier gate monitoring system based on video image analysis according to claim 1 is characterized in that: The total loss function of the generator is set to: L G =λ1L GAN (G,D)+λ2L content (G,x2,y2)+λ3L perceptual (G,x3,y3)+λ4L temporal (G,x t ,x t-1 ,y t ,y t-1 )+λ5L attention ; Among them, λ1, λ2, λ3, λ4, and λ5 are the weight coefficients of each loss term, which are used to balance the importance of different losses, so that the generator can fully consider multiple factors during the optimization process; L GAN is the adversarial loss function, L content is the content loss function, L perceptual is the perceptual loss function, L temporal is the temporal consistency loss function, L attention is the attention-guided loss; G is the generator, D is the discriminator, x t is the input data of the current time step t, x2 and x3 are also output data, y t is the real image at the current time step t, and y2 and y3 are also real images.
9. The AI barrier gate monitoring system based on video image analysis according to claim 1 is characterized in that: The residual block is used to allow information to be directly transferred across multiple layers and includes skip connections to facilitate the learning of complex mapping relationships.
10. The AI barrier monitoring system based on video image analysis according to claim 1 is characterized in that: The definition abnormality diagnosis module (200) uses a square gradient method based on a focus window mode to diagnose definition abnormality: Among them, F sq-grad is the square gradient value of the image, which reflects the grayscale change rate of the image in space. When the image clarity is not enough, the square gradient value of the image will decrease; f(x, y) represents the grayscale value of the pixel at position (x, y) in the image, where x and y are the coordinates of the pixel; M and N represent the total number of rows and columns of the image, respectively, and X and Y represent the row and column coordinates of the image, respectively.
Citation Information
Cited By
Barrier gate fault detection method and system based on image recognition and instruction verification
CN121767750A
Barrier fault detection method and system based on image recognition and instruction verification
CN121767750B