Low-light sign recognition and vehicle refueling behavior determination methods

CN122336701BActive Publication Date: 2026-09-01NANJING UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610796313.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-04
Publication Date
2026-09-01
Estimated Expiration
2046-06-04

AI Technical Summary

Technical Problem

例如,部分车辆可能停靠在非加油区域,或在加油区域短暂停留即离开,该类行为难以通过单纯的目标检测方法进行有效识别

Benefits of technology

[0062]本发明与现有技术相比,具有以下优点:(1)本发明构建了“图像增强—目标检测—空间约束—行为分析”的多阶段处理链路,实现从视觉感知到行为理解的全流程协同优化,相较于传统单一检测方法,能够在复杂环境下提供更稳定的识别和判断结果;(2)本发明通过引入基于Retinex理论的低照度增强方法,并结合多尺度特征建模策略,有效提升了图像在夜间及复杂光照条件下的质量,从而提高目标检测模型的输入质量与整体识别性能;(3)本发明通过引入车辆标定信息构建空间映射关系,并结合加油站场景结构特征对检测结果进行区域约束,有效降低了非合理区域内的误检率,提高了检测结果的准确性与可靠性;(4)本发明通过对车辆在特定区域内的停留时间进行建模,并结合空间约束规则,实现对异常停留及非加油行为的识别,相较于仅依赖目标检测的方法,能够进一步提升对场景行为的理解能力与应用价值。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122336701B_ABST
    Figure CN122336701B_ABST
Patent Text Reader

Abstract

This invention provides a method for recognizing low-light signs and determining vehicle refueling behavior, comprising: preprocessing input low-light video or images of gas stations based on the Retinex algorithm to output an enhanced image with optimized brightness and contrast; inputting the enhanced image into a YOLO detection model to detect and classify refueling signs and vehicles, outputting structured detection data including target category, bounding box coordinates, and recognition confidence; establishing a mapping relationship between image coordinates and real-world coordinates based on target vehicle coordinate information and homography transformation, combining the functional area division of the gas station to complete spatial constraint determination, and correcting the detection confidence to eliminate targets in unreasonable spatial locations; completing continuous frame trajectory tracking of vehicles through Kalman filtering, statistically analyzing the dwell time of vehicles in the effective refueling area, and combining vehicle type classification dynamic thresholds and spatial constraints to complete refueling behavior determination, outputting the final recognition and analysis results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an intelligent traffic management technology, and in particular to a method for recognizing low-light signs and determining vehicle refueling behavior. Background Technology

[0002] As a semi-enclosed traffic scenario, gas stations exhibit distinct regional and temporal characteristics in vehicle behavior. For example, vehicles typically park in the refueling area and complete the refueling operation within a certain timeframe. Automatic identification and analysis of vehicles and related signs can provide crucial data support for gas station operation management and safety supervision. However, the rationality of vehicle behavior is particularly important during the identification and analysis process. For instance, some vehicles may park in non-refueling areas or briefly stay in the refueling area before leaving. Such behavior is difficult to effectively identify using simple target detection methods. Existing technologies mainly improve detection performance under low-light conditions through image enhancement or target detection model improvements, but they still have the following shortcomings: (1) There is a lack of effective coordination between image enhancement and target detection, which can easily lead to distortion of feature information; (2) The detection capability for small-scale targets and weak feature targets is limited; (3) There is a lack of utilization of the spatial structure information of the gas station scenario, making it difficult to judge the rationality of vehicle positions; (4) There is a lack of modeling of temporal information such as vehicle dwell time, making it difficult to identify abnormal dwelling behavior. Therefore, it is necessary to propose a recognition method that integrates image enhancement, target detection, and scene constraint mechanisms to improve the target recognition capability under low illumination conditions and achieve comprehensive analysis of vehicle behavior at gas stations. Summary of the Invention

[0003] The purpose of this invention is to provide a method for recognizing low-light signs and determining vehicle refueling behavior, the specific steps of which are as follows:

[0004] Step S100: Based on the Retinex algorithm, preprocess the input low-light video or image of the gas station and output an enhanced image with optimized brightness and contrast.

[0005] Step S200: The enhanced image is input into the YOLO detection model to detect and classify refueling signs and vehicles. Through multi-scale feature extraction, confidence filtering, CIoU bounding box regression and SimAM attention feature optimization, the output is structured detection data containing target category, bounding box coordinates and recognition confidence.

[0006] Step S300: Based on the target vehicle coordinate information and homography transformation, establish the mapping relationship between image coordinates and real scene coordinates, combine the functional area division of the gas station to complete the spatial constraint judgment, and correct the detection confidence to eliminate targets in unreasonable spatial locations.

[0007] Step S400: Kalman filtering is used to track the vehicle's continuous frame trajectory, the dwell time of the vehicle in the effective refueling area is counted, and the refueling behavior is determined by combining the vehicle type classification dynamic threshold and spatial constraints, and the final recognition and analysis results are output.

[0008] Furthermore, step S100 specifically includes the following steps:

[0009] Step S110: Model the input image based on Retinex theory, dividing the image into illumination and reflection components. The decomposition formula is as follows:

[0010] ,

[0011] in, The original low-light image, For light component, For the reflection component, This is a pixel-level multiplication operation;

[0012] Step S120 involves performing nonlinear adaptive enhancement on the illumination component and gradient detail enhancement on the reflection component, respectively, to obtain the enhanced illumination and reflection components; wherein the adaptive enhancement formula for the illumination component is as follows:

[0013] ,

[0014] in, This is the light enhancement factor. This is the brightness compensation coefficient. The global average brightness of the image;

[0015] The formula for enhancing detail in the reflection component is as follows:

[0016] ,

[0017] in, To enhance the weighting coefficients, This represents the gradient information of the reflection component;

[0018] Step S130: The enhanced components are smoothed and denoised using neighborhood weighted filtering while preserving target edge information; the component smoothing and denoising formula is as follows:

[0019] ,

[0020] ,

[0021] in, The range of pixels. For the normalized weight function, , These are the smoothed illumination and reflection components, respectively;

[0022] Step S140: Perform image reconstruction and dynamic range normalization on the smoothed components to output the final enhanced image; wherein the formulas for image reconstruction and final enhanced output are as follows:

[0023] ,

[0024] ,

[0025] in, To reconstruct the intermediate image, For the enhanced output image, , These represent the minimum and maximum grayscale values ​​of the image, respectively.

[0026] Furthermore, the confidence level calculation formula in step S200 is as follows:

[0027] ,

[0028] in, The probability of the target exists is given by IoU, which is the intersection-union ratio between the predicted bounding box and the ground truth bounding box. Candidate boxes with a confidence score ≥ 0.5 are considered valid targets.

[0029] Bounding box regression uses the CIoU loss function, expressed as follows:

[0030] ,

[0031] in, The Euclidean distance between the centers of the predicted bounding box and the ground truth bounding box. To predict the center vector of the bounding box, The true bounding box center vector, The length of the diagonal of the minimum bounding rectangle. This is the aspect ratio consistency loss term;

[0032] The SimAM attention module calculation formula is as follows:

[0033] ,

[0034] ,

[0035] ,

[0036] in, This represents the neuron's energy value. This represents the aggregated value of neuron neighborhood features. For attention weights, For multi-scale fusion features, These are the optimized features.

[0037] Furthermore, the target classification loss function of the YOLO detection model in step 2 is,

[0038] ,

[0039] in, For the target true category, To predict class probabilities, This represents the total number of target categories.

[0040] Furthermore, the homography coordinate transformation formula in step S300 is as follows:

[0041] ,

[0042] in, For real-world physical coordinates, Image pixel coordinates, It is a 3×3 homography transformation matrix.

[0043] Furthermore, the spatial constraint determination function in step S300 is,

[0044] ,

[0045] in, For the effective refueling area, This is a result of spatial constraints;

[0046] The confidence level correction formula is as follows:

[0047] ,

[0048] in, The original confidence level. To optimize the post-confidence level.

[0049] Furthermore, the Kalman filter state prediction formula in step S400 is as follows:

[0050] ,

[0051] The state update formula is:

[0052] ,

[0053] in, To predict the state vector, For the updated state vector, For the first The optimal state vector of the vehicle target in the frame. Here is the state transition matrix. To control the input vector, To control the input matrix, For Kalman gain, For the observation matrix, To detect coordinate vectors.

[0054] Furthermore, the formula for calculating the effective dwell time of a vehicle in step S400 is as follows:

[0055] ,

[0056] in, For a single frame time interval, This represents the total number of frames in the video. For the first Frame space constraint results.

[0057] Furthermore, in step S400, the vehicles are classified as small cars. medium-sized cars Large vehicles The corresponding dynamic dwell time threshold is,

[0058] ,

[0059] The formula for determining refueling behavior is as follows:

[0060] ,

[0061] in, For the behavior determination result, For normal refueling, This is for temporary parking / not for refueling.

[0062] Compared with the prior art, the present invention has the following advantages: (1) The present invention constructs a multi-stage processing link of "image enhancement - target detection - spatial constraint - behavior analysis" to achieve full-process collaborative optimization from visual perception to behavior understanding. Compared with the traditional single detection method, it can provide more stable recognition and judgment results in complex environments. (2) The present invention introduces a low-light enhancement method based on Retinex theory and combines it with a multi-scale feature modeling strategy to effectively improve the quality of images at night and under complex lighting conditions, thereby improving the input quality and overall recognition performance of the target detection model. (3) The present invention introduces vehicle calibration information to construct a spatial mapping relationship and combines it with the structural features of the gas station scene to constrain the detection results in a region, effectively reducing the false detection rate in unreasonable areas and improving the accuracy and reliability of the detection results. (4) The present invention models the dwell time of vehicles in a specific area and combines it with spatial constraint rules to realize the recognition of abnormal dwelling and non-refueling behavior. Compared with the method that only relies on target detection, it can further improve the understanding of scene behavior and application value.

[0063] The present invention will now be further described with reference to the accompanying drawings. Attached Figure Description

[0064] Figure 1 This is a flowchart of the overall process of the method of the present invention. Detailed Implementation

[0065] like Figure 1 As shown, the method of the present invention mainly includes four stages: low-light image enhancement, target detection, spatial constraints, and temporal constraints.

[0066] Step S100: Preprocess the input video or image, construct a low-light image enhancement model based on Retinex theory, and adaptively adjust the image brightness and contrast through illumination decomposition and reconstruction mechanism to improve the visibility of the signage area and suppress noise interference.

[0067] Step S110: Based on Retinex theory, the input image is modeled by dividing it into an illumination component reflecting ambient light and a reflection component describing the material's bulk properties. The image after division is represented as follows:

[0068] ,

[0069] in, For light component, For the reflection component, These are the coordinates of a pixel in the image. This involves pixel-level multiplication. Through the above decomposition process, independent illumination and reflection components are obtained, enabling subsequent enhancement of illumination to address low-light issues, while simultaneously optimizing detail information individually, thus providing a processing foundation for component-level collaborative enhancement in step S120.

[0070] Step S120: Based on the illumination component and reflection component obtained in step S110, illumination enhancement and reflection enhancement processing are performed respectively to achieve coordinated optimization processing of the low-light image. For the illumination component, a nonlinear enhancement function is constructed to adaptively enhance low-brightness areas and avoid overexposure in bright areas, thereby improving the overall brightness distribution. Its expression form is as follows:

[0071] ,

[0072] in, This is the light enhancement factor; This is the brightness compensation coefficient; This represents the global average brightness of the image.

[0073] Simultaneously, to improve image detail representation, the reflection component is enhanced. This is achieved by gradient enhancement of the reflection component, improving the texture information of target areas such as vehicle outlines and refueling signs. The expression format is as follows:

[0074] ,

[0075] in, To enhance the weighting coefficients; This represents the gradient information of the reflection component.

[0076] Through the above dual-branch enhancement process, the overall brightness of the image can be greatly improved, and the structural details of the target area can be enhanced at the same time; however, the enhancement process may introduce noise amplification problems, so the enhancement results need to be further optimized for stability in step S130.

[0077] Step S130: To address the issue of noise amplification during low-light enhancement, a smoothing constraint mechanism is introduced to suppress high-frequency noise while preserving edge information of the target area, thereby improving the stability of the enhanced image.

[0078] To address the noise amplification issue in the enhanced illumination and reflection components, smoothing constraints need to be introduced separately. High-frequency noise is then suppressed using a neighborhood-weighted filtering method. The processing procedure can be expressed as follows:

[0079] ,

[0080] ,

[0081] in, Indicates the range of the pixel neighborhood; This is the normalized weight function.

[0082] Building upon this, to avoid excessive attenuation of edge information during smoothing, a gradient-based edge preservation constraint is introduced. This adaptively reduces the smoothing intensity in areas with significant pixel gradient changes, thereby suppressing noise while preserving the edge structural features of signs and vehicle targets. After this processing, the enhanced image achieves improved brightness and detail while maintaining stability, providing reliable input for subsequent image reconstruction and overall contrast optimization.

[0083] Step S140 involves reconstructing the enhanced illumination and reflection components, and optimizing the overall image contrast using a dynamic range adjustment method to enhance the texture features and edge information of signs and vehicle targets. The resulting enhanced image can be represented as follows:

[0084] ,

[0085] in, , These represent the illumination and reflection components of the image after smoothing, respectively, for the enhanced brightness image.

[0086] After reconstruction, to further improve the overall visual effect and target recognizability of the image, dynamic range adjustment and normalization were performed on the enhanced image. The final processed output image is as follows:

[0087] ,

[0088] in, and These represent the minimum and maximum grayscale values ​​of the image, respectively.

[0089] Through the above reconstruction and optimization processes, an enhanced image with balanced brightness distribution and good contrast is obtained, thereby providing high-quality input for subsequent gas station signage and vehicle detection and recognition models, and realizing a complete closed loop of the low-light image enhancement process.

[0090] Step S200: Construct a sign and vehicle recognition method based on the YOLOv8 model. By introducing a multi-scale feature fusion structure and attention mechanism, feature extraction and target localization are performed on the enhanced image to achieve stable detection of small-scale and weak-texture targets, and output the target category and corresponding spatial location.

[0091] Step S210: The enhanced image output from step S100 is input into the target detection network. Feature extraction is performed on the image through the backbone network, and a multi-scale feature representation structure is constructed to enhance the perception capability of targets at different scales. The enhanced image is then input into the YOLOv8 model backbone network, where convolutional downsampling extracts feature maps at different scales, achieving a joint representation of the target's global semantics and local details. The initial definition of the target candidate bounding box is...

[0092] ,

[0093] in, The coordinates of the target center; and These represent the bounding box width and height, respectively. Through multi-scale feature extraction, the model can take into account both the details of small targets such as refueling signs and the global information of large targets such as vehicles, providing core feature support for target localization and confidence screening in step S220.

[0094] Step S220: Based on the multi-scale feature map generated in step S210, the target localization and recognition result confidence screening are completed, preliminary detection results are generated, and invalid candidate boxes are removed. After obtaining the candidate bounding boxes of each recognized target, it is necessary to jointly calculate the target existence probability and class probability, and construct the target confidence judgment function, which is expressed in the form of:

[0095] ,

[0096] in, The probability of the existence of the target. To perform an intersection-union comparison between the predicted bounding box and the ground truth bounding box, The overall confidence level of the target, confidence level The candidate boxes are determined to be valid targets.

[0097] Meanwhile, to address the issues of vehicle and sign boundaries easily overlapping and positioning offset under low light conditions in gas station scenarios, it is also necessary to introduce... The complete intersection-union (CIU) loss is used to optimize bounding box regression accuracy. This loss simultaneously considers the CIU, center distance, and aspect ratio consistency of bounding boxes, addressing the issues of inaccurate localization of small targets and slow bounding box convergence. Its expression is as follows:

[0098] ,

[0099] in, The Euclidean distance between the centers of the predicted bounding box and the ground truth bounding box. To predict the center coordinate vector of the bounding box, The center coordinate vector of the actual bounding box. It is the diagonal length of the smallest bounding rectangle that simultaneously encloses the predicted bounding box and the ground truth bounding box. This is the aspect ratio consistency loss term for bounding boxes, used to constrain the aspect ratio of the predicted box to be consistent with that of the ground truth box.

[0100] Filtering by confidence level and Loss joint optimization can initially achieve stable positioning of gas station vehicles and signs, but small-scale gas station signs and weak texture signs have weak feature expression and are easily affected by complex backgrounds. Therefore, an attention mechanism needs to be introduced in step S230 for further optimization.

[0101] Step S230: Based on the multi-scale features extracted in step S210 and the localization results in step S220, a multi-scale attention fusion mechanism is introduced to enhance the feature response of small-scale markers and weakly characterized targets. The shallow detail features and deep semantic features extracted by the backbone network in step S210 are fused at multiple scales to obtain a multi-scale fused feature map. Addressing the issues of low accuracy and lack of feature prominence in the initial detection of fuel dispenser icons and long-distance vehicle recognition, and the engineering requirement for lightweight real-time inference in gas station monitoring scenarios, the SimAM (Simple Attention Module) lightweight parameterless attention module is introduced. This module, based on the neuroscience receptive field mechanism, adaptively calculates the importance weight of each neuron in the feature map through an energy function. It does not introduce additional training parameters, does not increase model computational overhead, and has faster inference speed. It can accurately enhance the features of small-scale targets under low light conditions and suppress complex background interference while meeting the requirements for lightweight deployment of gas station monitoring equipment. This feature optimization process includes the following steps:

[0102] Step S231: Calculate the energy function of a single neuron in the feature map.

[0103] ,

[0104] in, The current neuron's feature value. This represents the aggregated value of neuron neighborhood features. This represents the neuron's energy value; the smaller the energy value, the higher the probability that the neuron belongs to the target feature.

[0105] Step S232: Generate attention weights based on the energy function.

[0106] ,

[0107] in, For SimAM attention weights, the lower the energy and the larger the weight, the stronger the target feature enhancement.

[0108] Step S233, Multi-scale feature attention weighted optimization,

[0109] ,

[0110] in, This is a pixel-level multiplication operation. The multi-scale fusion features output in step S210 The output features optimized for attention.

[0111] This optimized feature mechanism can significantly improve the feature representation capabilities of weak features and small-scale targets such as gas station signs and markers, reduce interference from complex backgrounds such as gas station pillars, walls, and equipment, further enhance the robustness and recognition accuracy of the detection model, and provide optimized assurance for the final detection result output in step S240.

[0112] Step S240: Based on the completed target classification and detection results, structured detection data including target category, spatial location, and confidence level is generated. After feature optimization and localization correction, the model outputs the final detection results. The target classification loss is calculated using the cross-entropy function, expressed as follows:

[0113] ,

[0114] in, The target is the true category; To predict class probabilities; Total number of target categories (signs, vehicles, background).

[0115] The final output is structured data containing target category, center coordinates, bounding box size, and target recognition confidence. Through the above detection process, stable recognition of gas station targets under low light conditions is achieved, providing accurate target location input for image-real-world spatial mapping in step S300.

[0116] Step S300: Based on vehicle calibration information, establish a spatial mapping relationship between image coordinates and actual scene coordinates, and construct a target distribution constraint model in combination with the structural features of the gas station scene. Perform regional screening and confidence optimization on the detection results to eliminate targets in unreasonable spatial locations and enhance reasonable targets.

[0117] Step S310: Based on vehicle calibration information, establish a mapping relationship between the image coordinate system and the actual scene coordinate system, transforming the target position in the image space to the actual scene space. The homography transformation matrix is ​​solved using the four calibration corner points at the gas station site, and the mapping relationship can be expressed as follows:

[0118] ,

[0119] in, The target's real-world physical coordinates; This is a 3×3 homography transformation matrix. Through coordinate mapping, the pixel positions of the target in the image are converted into the actual positions on the ground of the gas station, providing a spatial basis for the functional area division in step S320.

[0120] Step S320: Based on the actual structure of the gas station, it is divided into three functional areas: a refueling area, a passage area, and a non-stopping area. A regional constraint function is then constructed to determine the target location. After the division, its expression form is as follows:

[0121] ,

[0122] in, Indicates the valid refueling area; This is the result of spatial constraints. By dividing the area and determining the constraints, invalid detection results outside the refueling area can be filtered out, but the detection confidence still needs to be further optimized in combination with spatial constraints. Therefore, the confidence correction needs to be completed in step S330.

[0123] Step S330, combining the regional constraint results from step S320, reduces the confidence weight of targets in unreasonable regions. Based on the spatial constraint results from step S320, the original detection confidence is weighted and corrected, resulting in the optimized confidence expression form:

[0124] ,

[0125] in, Identify the confidence level for the original target; To optimize post-detection confidence, this operation sets the confidence level of targets in non-refueling areas to zero, completely eliminating false positives due to spatial inconsistencies and improving the scenario-based validity of the detection results.

[0126] After coordinate mapping, regional constraints, and confidence optimization, only vehicles and signage targets within the effective refueling area are retained, forming a spatially compliant detection result. Through the above spatial constraint process, the detection result is matched with the gas station scene structure, solving the problem of spatial false detection and providing a spatially compliant target basis for vehicle time-series tracking and refueling behavior determination in step S400.

[0127] Step S400: Based on the target detection results and spatial constraint results, statistical analysis is performed on the dwell time of the vehicle in the refueling area. Combined with the preset time threshold and regional constraint rules, the vehicle behavior is judged to identify abnormal dwelling and non-refueling behavior, and the structured analysis results are output.

[0128] Step S410: Track the position of the same vehicle target in consecutive frames, construct a Kalman filter trajectory tracking model, and achieve accurate matching and trajectory prediction of the same vehicle target in consecutive frames. For the continuous frame sequence of video, establish a vehicle target state prediction and update model, with the state prediction and update formulas as follows:

[0129] ,

[0130] ,

[0131] in, For the first The frame vehicle target prediction state vector includes the target center coordinates and velocity information; For the first The optimal state vector of the vehicle target in the frame; For the first The optimal state vector after the vehicle target is updated in the frame; This is the state transition matrix, which represents the temporal propagation relationship of the target state; To control the input matrix; The system control input vector is 0 in the scenario of uniform or slow vehicle tracking at a gas station, where there is no external forced control input. Kalman gain is used to balance the weights of predicted and detected values. For the first The target coordinate vector output by the frame model detection; The observation matrix is ​​used to map and transform the state vector into observation coordinates. Through trajectory tracking, the positional changes of the same vehicle in consecutive frames can be locked, avoiding confusion among multiple targets and providing continuous target trajectory data for the dwell time statistics in step S420.

[0132] Step S420: Based on dwell time and spatial location, construct a behavior determination function to classify vehicle behavior. To calculate the duration a vehicle spends within the effective refueling area, the effective dwell time is expressed as follows:

[0133] ,

[0134] in, This is a single frame time interval; This represents the total number of frames in the video. For the first The actual spatial constraint result of the frame. This formula can accurately calculate the actual dwell time of the vehicle in the refueling area, excluding invalid time for passage and short stops, and providing the core temporal basis for the behavior determination in step S430.

[0135] Step S430: Based on the judgment result of step S420, and combined with vehicle type and spatial constraints, the final accurate judgment of vehicle refueling behavior is completed, and abnormal behaviors are marked and output to provide a basis for subsequent system decisions or manual intervention. Considering the significant differences in fuel tank capacity and refueling time among different vehicle models, vehicles at gas stations are divided into three categories: small cars, medium cars, and large cars. Abandoning the single fixed threshold mode, a dynamic dwell time threshold bound to vehicle model is constructed. Combined with the spatial constraint result of step S300, refined differentiation of refueling behavior is achieved, effectively improving the judgment accuracy.

[0136] First, the vehicle types are standardized and classified:

[0137] small cars Sedans, SUVs, and mini passenger vehicles (fuel tank capacity 35–55L);

[0138] Mid-size car MPVs, light trucks, and rugged off-road vehicles (fuel tank capacity 55–80L);

[0139] large vehicles Large passenger buses, heavy-duty trucks, and engineering vehicles (fuel tank capacity of 80L or more).

[0140] Based on domestic gas station operation statistics and service standards, a formula for adaptive dwell time threshold for different vehicle models is constructed.

[0141] ,

[0142] Combining spatial constraints and effective dwell time, a refueling behavior determination model is constructed, which is expressed as follows:

[0143] ,

[0144] in, This represents the final behavior determination result for the current vehicle. This indicates that the vehicle is in normal refueling condition. This indicates that the vehicle is temporarily parked or not in a refueling state; The spatial constraint results output in step S320; The effective dwell time of the vehicle as calculated in step S420; This is the dynamic dwell time threshold corresponding to the current vehicle model. This hierarchical judgment model fully adapts to the actual differences in refueling time among different vehicle models, completely solving the misjudgment problem that a single threshold cannot adapt to all vehicle models, and providing a basis for possible subsequent manual intervention.

[0145] Through the aforementioned time-series tracking and behavior determination process, the final output is structured data containing low-light enhanced images, target detection results, spatial constraint results, dwell time, and behavior determination conclusions. This achieves end-to-end collaborative optimization from low-light image enhancement to target detection, spatial constraints, and behavior understanding, completing all functions of low-light sign recognition and vehicle refueling behavior determination in a gas station scenario. The method provided by this invention exhibits good adaptability and stability in low-light traffic scenarios, effectively improving sign recognition performance and making it suitable for practical engineering applications.

Claims

1. A method for recognizing low-light signs and determining vehicle refueling behavior, characterized in that, The specific steps are as follows: Step S100: Based on the Retinex algorithm, preprocess the input low-light video or image of the gas station and output an enhanced image with optimized brightness and contrast. Step S200: The enhanced image is input into the YOLO detection model to detect and classify refueling signs and vehicles. Through multi-scale feature extraction, confidence filtering, CIoU bounding box regression and SimAM attention feature optimization, the output is structured detection data containing target category, bounding box coordinates and recognition confidence. Step S300: Based on the target vehicle coordinate information and homography transformation, establish the mapping relationship between image coordinates and real scene coordinates, combine the functional area division of the gas station to complete the spatial constraint judgment, and correct the detection confidence to eliminate targets in unreasonable spatial locations. Step S400: Kalman filtering is used to track the vehicle's continuous frame trajectory, the dwell time of the vehicle in the effective refueling area is counted, and the refueling behavior is determined by combining the vehicle type classification dynamic threshold and spatial constraints. The final recognition and analysis results are then output. The spatial constraint determination function in step S300 is: , in, For real-world physical coordinates, For the effective refueling area, This is a result of spatial constraints; The confidence level correction formula is as follows: , in, The original confidence level. To optimize the post-confidence level; In step S400, the vehicles are classified as small cars. medium-sized cars Large vehicles The corresponding dynamic dwell time threshold is, , The formula for determining refueling behavior is as follows: , in, For the behavior determination result, For normal refueling, For temporary stops / non-refueling activities, T stay Indicates the effective stay time.

2. The method according to claim 1, characterized in that, Step S100 includes the following specific steps: Step S110: Model the input image based on Retinex theory, dividing the image into illumination and reflection components. The decomposition formula is as follows: , in, The original low-light image, For light component, For the reflection component, This is a pixel-level multiplication operation; Step S120 involves performing nonlinear adaptive enhancement on the illumination component and gradient detail enhancement on the reflection component, respectively, to obtain the enhanced illumination and reflection components; wherein the adaptive enhancement formula for the illumination component is as follows: , in, This is the light enhancement factor. This is the brightness compensation coefficient. The global average brightness of the image; The formula for enhancing detail in the reflection component is as follows: , in, To enhance the weighting coefficients, This represents the gradient information of the reflection component; Step S130: The enhanced components are smoothed and denoised using neighborhood weighted filtering while preserving target edge information; the component smoothing and denoising formula is as follows: , , in, The range of pixels. For the normalized weight function, , These are the smoothed illumination and reflection components, respectively; Step S140: Perform image reconstruction and dynamic range normalization on the smoothed components to output the final enhanced image; wherein the formulas for image reconstruction and final enhanced output are as follows: , , in, To reconstruct the intermediate image, For the enhanced output image, , These represent the minimum and maximum grayscale values ​​of the image, respectively.

3. The method according to claim 1, characterized in that, The confidence level calculation formula in step S200 is as follows: , in, The probability of the target exists is given by IoU, which is the intersection-union ratio between the predicted bounding box and the ground truth bounding box. Candidate boxes with a confidence score ≥ 0.5 are considered valid targets. Bounding box regression uses the CIoU loss function, expressed as follows: , in, The Euclidean distance between the centers of the predicted bounding box and the ground truth bounding box. To predict the center vector of the bounding box, The true bounding box center vector, The length of the diagonal of the minimum bounding rectangle. This is the aspect ratio consistency loss term; The SimAM attention module calculation formula is as follows: , , , in, This represents the neuron's energy value. For attention weights, For multi-scale fusion features, These are the optimized features.

4. The method according to claim 3, characterized in that, In step S200, the target classification loss function of the YOLO detection model is: , in, For the target true category, To predict class probabilities, This represents the total number of target categories.

5. The method according to claim 3, characterized in that, The homography coordinate transformation formula in step S300 is as follows: , in, For real-world physical coordinates, Image pixel coordinates, It is a 3×3 homography transformation matrix.

6. The method according to claim 5, characterized in that, The Kalman filter state prediction formula in step S400 is as follows: , The state update formula is: , in, To predict the state vector, For the updated state vector, For the first The optimal state vector of the vehicle target in the frame. Here is the state transition matrix. To control the input vector, To control the input matrix, For Kalman gain, For the observation matrix, To detect coordinate vectors.

7. The method according to claim 6, characterized in that, The formula for calculating the effective dwell time of a vehicle in step S400 is as follows: , in, For a single frame time interval, This represents the total number of frames in the video. For the first Frame space constraint results.

Citation Information

Patent Citations

  • Oil unloading and transportation method and oil unloading and transportation device

    CN119848297A