Shielding state detection method and device of traffic signboard and electronic equipment
By using the YOLOv8n model to detect and locate the occlusion status of traffic signs, the problem of inaccurate detection of occlusion status in existing technologies is solved, enabling real-time monitoring and precise positioning, reducing the cost of manual inspection and the risk of traffic accidents, and improving road safety.
Patent Information
- Application Number
- CN202511074881.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-11-11
AI Technical Summary
Existing technologies lack methods for detecting the occlusion status of traffic signs, resulting in the inability to accurately detect and locate occluded signs, hindering timely handling, increasing the cost of manual inspections and the risk of traffic accidents.
The YOLOv8n model is used to detect the occlusion status of traffic signs. By acquiring the detection images and combining them with GPS coordinates to obtain location information, the occlusion status information is bound to the trained and optimized YOLOv8n model to achieve real-time monitoring and accurate positioning.
It improved the accuracy of test results, reduced the cost of manual inspections, shortened the response time to problems, reduced the risk of traffic accidents caused by obstructed signs, and improved the level of road safety.
Smart Images

Figure CN120932202A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic sign detection technology, and in particular to a method, apparatus, and electronic device for detecting the occlusion status of traffic signs. Background Technology
[0002] With the increasing number of vehicles on the road, especially in the field of intelligent transportation and autonomous driving, vehicles encounter traffic signs while driving. These signs contain a wealth of road traffic information, providing drivers with warnings and auxiliary instructions, playing a crucial role in reducing driver stress and traffic congestion. Therefore, accurately identifying traffic signs is of paramount importance for traffic safety.
[0003] However, there is currently a lack of methods to detect when traffic signs are obscured. When traffic signs are obscured, it is impossible to accurately detect them, locate them, or address them promptly. Summary of the Invention
[0004] To address, or at least partially address, the aforementioned technical problems, this invention provides a method, apparatus, and electronic device for detecting the occlusion status of traffic signs. This facilitates real-time monitoring and precise location of occlusion issues on traffic signs, enabling maintenance personnel to promptly eliminate these issues. It reduces manual inspection costs, shortens response time, improves processing efficiency, lowers the risk of traffic accidents caused by occlusion, and enhances road safety.
[0005] In a first aspect, the present invention provides a method for detecting the occlusion state of traffic signs, comprising:
[0006] Acquire detection images of traffic signs within a preset distance collected by the acquisition device;
[0007] The location information of the traffic sign is obtained based on the center pixel of the detected image and a GPS coordinate formula.
[0008] The detected image is transmitted to the trained and optimized YOLOv8n model to obtain the occlusion status information of the traffic sign;
[0009] The location information and occlusion status information of the traffic signs within a preset distance are bound together and output as the detection result of the traffic signs.
[0010] In some embodiments, the trained and optimized YOLOv8n model is obtained through the following method:
[0011] Collect a dataset of detection image samples corresponding to the traffic signs under different weather and lighting conditions;
[0012] The collected detection image sample dataset is input into the YOLOv8n model training platform;
[0013] The detected image sample dataset is preprocessed.
[0014] The YOLOv8n model was trained and optimized using the preprocessed detection images.
[0015] In some embodiments, data preprocessing of the detected image sample dataset includes:
[0016] The occlusion degree determination function is used to determine the occlusion state of the detected image;
[0017] Based on the occlusion state of the detected images, the LabelImg tool is used to classify and label the detected image sample dataset. The classification labels include normal labels and occlusion labels.
[0018] The detected images labeled as occlusion are randomly cropped, rotated, and their brightness adjusted, and complex occlusions are simulated using a generative adversarial network.
[0019] In some embodiments, the occlusion degree determination function is:
[0020]
[0021] in, The pixel area of the occluded region in the detected image. The total pixel area of the detected image; when If the image is in an occluded state, it is determined that the detected image is in a normal state; otherwise, it is determined that the detected image is in a normal state.
[0022] In some embodiments, a CBAM module is embedded in the YOLOv8n model to enhance attention to occluded areas in the detected image.
[0023] In some embodiments, the YOLOv8n model uses CIoU Loss as the loss function during training and optimization. The loss function is:
[0024]
[0025] in, The intersection-union ratio (IU) of the predicted bounding box and the ground truth bounding box. The distance between the center points of the predicted bounding box and the ground truth bounding box is the Euclidean distance. It is the diagonal length of the smallest rectangle that simultaneously encloses the predicted bounding box and the ground truth bounding box. For aspect ratio consistency, Here, b is the weighting coefficient, and b is the center point of the predicted bounding box. gt The center point of the true bounding box.
[0026] In some embodiments, the location information of the traffic sign is obtained based on the center pixel of the detected image and a GPS coordinate formula, including:
[0027] The location information of the traffic sign is obtained by mapping the center pixel of the detected image to a GPS coordinate formula, which is:
[0028]
[0029] in, Location information for traffic signs. To collect the location information of the device. For pixel offset, This is the conversion ratio for the distance from the pixel to the ground.
[0030] Secondly, the present invention also provides a device for detecting the occlusion status of traffic signs, comprising:
[0031] The first acquisition module is used to acquire the detection images of traffic signs within a preset distance collected by the acquisition device;
[0032] The second acquisition module is used to acquire the location information of the traffic sign based on the center pixel of the detected image and a GPS coordinate formula.
[0033] The module is used to transmit the detected image to the trained and optimized YOLOv8n model to obtain the occlusion status information of the traffic sign;
[0034] The output module is used to bind the location information and occlusion status information of the traffic sign within a preset distance and output them as the detection result of the traffic sign.
[0035] Thirdly, the present invention also provides an electronic device, including a processor and a memory, wherein the processor executes the steps of the traffic sign occlusion detection method as described in the first aspect by calling a program or instruction stored in the memory.
[0036] The technical solution provided by the embodiments of the present invention has the following advantages compared with the prior art:
[0037] The traffic sign occlusion detection method provided in this embodiment includes: acquiring detection images of traffic signs within a preset distance collected by a data acquisition device; acquiring the location information of the traffic signs based on the detection images; transmitting the detection images to a trained and optimized YOLOv8n model to obtain the occlusion status information of the traffic signs; and binding the location information and occlusion status information of the traffic signs within the preset distance as the detection result of the traffic signs. By acquiring the occlusion status and location information of the traffic signs within a preset distance, and binding the location information and occlusion status information of the traffic signs within the preset distance, the accuracy of the output detection results can be improved. This facilitates real-time monitoring and precise positioning of traffic sign occlusion problems, enabling maintenance personnel to accurately determine the target location of traffic signs with occlusion problems and promptly reach the target location to process the traffic signs, thereby eliminating the occlusion problems. This reduces manual inspection costs, shortens problem response time, improves processing efficiency, reduces the risk of traffic accidents caused by sign occlusion, and enhances road safety. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 A flowchart illustrating a method for detecting the occlusion state of a traffic sign according to an embodiment of the present invention;
[0041] Figure 2 A system architecture diagram provided for an embodiment of the present invention;
[0042] Figure 3 This is a schematic diagram of the structure of a traffic sign occlusion detection device provided in an embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0044] To better understand the above-mentioned objectives, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0045] Many specific details are set forth in the following description in order to provide a full understanding of the invention, but the invention may also be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the invention, and not all embodiments.
[0046] The traffic sign occlusion detection method provided in this embodiment obtains the occlusion status of traffic signs within a preset distance, as well as the location information of the traffic signs. By binding the location information and occlusion status information of the traffic signs within the preset distance, the accuracy of the output detection results can be improved. This facilitates real-time monitoring and precise location of traffic sign occlusion problems, enabling maintenance personnel to accurately determine the target location of traffic signs with occlusion problems and promptly reach the target location to handle the traffic signs and eliminate the occlusion problem. This reduces manual inspection costs, shortens problem response time, improves processing efficiency, reduces the risk of traffic accidents caused by sign occlusion, and enhances road safety.
[0047] The following description, in conjunction with the accompanying drawings, provides an exemplary description of the traffic sign occlusion detection method, apparatus, and electronic device provided in the embodiments of the present invention.
[0048] Figure 1 This is a flowchart illustrating a method for detecting the occlusion state of traffic signs according to an embodiment of the present invention. This method is applicable to application scenarios requiring the detection of the occlusion state of traffic signs. This method can be executed by the traffic sign occlusion state detection device provided in this embodiment of the invention, and the temperature detection device for detecting the occlusion state of traffic signs can be implemented using software and / or hardware. Figure 1 As shown, the occlusion detection of this traffic sign includes the following steps:
[0049] S101. Acquire the detection images of traffic signs within a preset distance collected by the acquisition device.
[0050] The data acquisition device can be, for example, but is not limited to, a camera. It employs camera calibration and monocular ranging technology to acquire detection images of traffic signs within a preset distance, such as 50 meters. This method of acquiring detection images of traffic signs within a 50-meter range reduces false detections at long distances.
[0051] The monocular ranging formula is as follows:
[0052]
[0053] in, For the camera's focal length, This refers to the actual height of the traffic sign. The height is in pixels.
[0054] In some implementations, binocular cameras or lidar may be used instead of monocular ranging to improve distance accuracy, but this disclosure does not limit this aspect.
[0055] S102. Obtain the location information of the traffic sign based on the center pixel of the detected image and the GPS coordinate formula.
[0056] Specifically, in this step, the location information of the traffic sign is obtained based on the center pixel of the detection image obtained in S101 and the GPS coordinate formula, thereby realizing the positioning of the traffic sign.
[0057] In some embodiments, the location information of the traffic sign is obtained based on the center pixel of the detected image and a GPS coordinate formula, including:
[0058] The location information of the traffic sign is obtained by mapping the center pixel of the detected image to the GPS coordinate formula, which is:
[0059]
[0060] in, Location information for traffic signs. To collect the location information of the device. For pixel offset, This is the conversion ratio for the distance from the pixel to the ground.
[0061] Therefore, by obtaining the location information of the traffic sign, and combining it with the occlusion status information of the traffic sign obtained in S103 below, the location information of the traffic sign can be bound with the occlusion status of the traffic sign, thereby enabling the location of the traffic sign to be determined while obtaining the occlusion status of the traffic sign.
[0062] S103. Transmit the detected image to the trained and optimized YOLOv8n model to obtain the occlusion status information of the traffic sign.
[0063] The trained and optimized YOLOv8n model serves as the object detection model. The input resolution of the YOLOv8n model is 640×640 to balance detection speed and accuracy. Specifically, in this step, the trained and optimized YOLOv8n model is deployed on an edge computing device, such as a device based on the Rockchip RK3588 + Kylin system. After acquiring the detection image, the image is directly transmitted to the edge computing device to obtain the occlusion status information of the traffic sign.
[0064] YOLOv8n (nano) is the smallest and lightest version, with few parameters (approximately 3M) and extremely fast inference speed (suitable for edge devices or real-time applications). Specifically, pre-trained YOLOv8n weights are loaded as initial parameters, and some network layers are frozen to accelerate convergence. For example, some network layers can be Focus modules and CSP-Bottleneck modules. The Focus module retains low-level features pre-trained on large-scale datasets such as COCO; the CSP-Bottleneck module can learn only "higher-order" features related to occlusion detection in deeper layers during the initial training phase, without destroying the general image learned during pre-training.
[0065] In some implementations, the optimized YOLOv8n model is trained using the following methods:
[0066] Collect a dataset of detection image samples of traffic signs under different weather and lighting conditions;
[0067] The collected detection image sample dataset is input into the YOLOv8n model training platform;
[0068] Data preprocessing is performed on the detected image sample dataset;
[0069] The YOLOv8n model was trained and optimized using the preprocessed detection images.
[0070] Specifically, detection image sample datasets were collected under various conditions, including sunny days, rainy days, nighttime, and different angles. These datasets included cases of partial occlusion, complete occlusion, multi-layer occlusion, and no occlusion. Further, the detection image sample datasets were preprocessed and then input into the YOLOv8n model training platform for training and optimization of the YOLOv8n model.
[0071] In some embodiments, data preprocessing of the detection image sample dataset includes:
[0072] The occlusion degree determination function is used to determine the occlusion state of the detected image;
[0073] Based on the occlusion status of the detected images, the LabelImg tool is used to classify and label the detected image sample dataset. The classification labels include normal labels and occlusion labels.
[0074] The detected images labeled as occlusion are randomly cropped, rotated, and their brightness adjusted, and complex occlusions are simulated using a generative adversarial network.
[0075] Specifically, an occlusion degree determination function, or occlusion scoring mechanism, is introduced during model training. This function determines the occlusion status of the detected images, thus identifying whether an image is occluded. The LabelImg tool is then used to label occluded detected images as occluded and unoccluded images as normal, effectively dividing the detected images into two groups: one group showing occlusion and the other showing unoccluded images. The occluded portion of the detected images is then labeled. Finally, data augmentation is performed on the occluded images to improve the model's generalization ability.
[0076] Specifically, the detected image undergoes random cropping, rotation, brightness adjustment, and the use of a generative adversarial network (GAN) to simulate complex occlusion. Random cropping selects a sub-region from the original image to generate a smaller image, focusing on the region of interest (ROI) and reducing the impact of irrelevant background on model training. Rotation rotates the image around its center point at random angles (e.g., ±10°, ±30°) to mimic different shooting angles of objects in real-world scenes. Brightness adjustment alters the overall lightness and darkness of the image. The GAN generates realistic occlusion patterns, which are then superimposed on the original image to simulate real-world occlusion scenarios (such as leaves obscuring objects, rain or fog interference), and can even simulate virtual leaves, improving model generalization and generating occlusion patterns that more closely resemble real-world scenes.
[0077] In some implementations, the occlusion level determination function is:
[0078]
[0079] in, To detect the pixel area of the occluded region in an image, To detect the total pixel area of an image; when If the image is in an occluded state, it is determined that the image is in a normal state; otherwise, it is determined that the image is in a normal state.
[0080] Specifically, an occlusion level threshold is set. When η>0.3, the detected image is determined to be in an occluded state; when η≤0.3, the detected image is determined to be in a normal state and is labeled accordingly.
[0081] In some implementations, when 0.30 < η ≤ 0.60, the detected image can be determined to be in a moderate occlusion state, at which point the visible area is significantly reduced; when 0.60 < η ≤ 0.90, the detected image can be determined to be in a severe occlusion state, with only a small visible area remaining; when η > 0.90, the detected image can be determined to be in a near-complete occlusion state, almost entirely covered.
[0082] In some embodiments, a CBAM module is embedded in the YOLOv8n model to enhance attention to occluded areas in the detected image.
[0083] Specifically, inserting the CBAM module into the backbone of the YOLOv8n model can improve the detection accuracy of images in occluded scenes. Through the two-layer structure of channel attention and spatial attention in the CBAM module, the sensitivity to small targets and partial targets can be improved, which helps to reduce missed detections caused by occlusion.
[0084] In some embodiments, the YOLOv8n model uses CIoU Loss as the loss function during training and optimization. The loss function is:
[0085]
[0086] in, The intersection-union ratio (IU) of the predicted bounding box and the ground truth bounding box. The distance between the center points of the predicted bounding box and the ground truth bounding box is the Euclidean distance. It is the diagonal length of the smallest rectangle that simultaneously encloses the predicted bounding box and the ground truth bounding box. For aspect ratio consistency, Here, b is the weighting coefficient, and b is the center point of the predicted bounding box. gt The center point of the true bounding box.
[0087] Specifically, CIoU Loss is used as the parameter of the YOLOv8n model. CIoU Loss fills the gaps in traditional IoU series losses through the comprehensiveness of geometric constraints and the efficiency of gradient optimization, thereby improving the localization accuracy in target detection tasks.
[0088] S104. Bind the location information and occlusion status information of traffic signs within a preset distance and output them as the detection results of traffic signs.
[0089] Specifically, in this step, the location information and occlusion status information of traffic signs within a preset distance are bound together, and then the detection results are output. This allows for the detection of the occlusion status information of traffic signs while simultaneously locating their location. This enables real-time monitoring and precise location of occlusion issues, allowing maintenance personnel to accurately determine the target location of the occluded traffic signs and promptly reach that location to address the occlusion problem and eliminate it.
[0090] The traffic sign occlusion detection method provided in this embodiment includes: acquiring detection images of traffic signs within a preset distance collected by a data acquisition device; acquiring the location information of the traffic signs based on the detection images; transmitting the detection images to a trained and optimized YOLOv8n model to obtain the occlusion status information of the traffic signs; and binding the location information and occlusion status information of the traffic signs within the preset distance as the detection result output. By acquiring the occlusion status and location information of the traffic signs within a preset distance, and binding the location information and occlusion status information, the accuracy of the output detection result can be improved. This facilitates real-time monitoring and precise location of traffic sign occlusion problems, enabling maintenance personnel to accurately determine the target location of traffic signs with occlusion problems and promptly reach the target location to handle the traffic signs, thereby eliminating the occlusion problem. This reduces manual inspection costs, shortens problem response time, improves processing efficiency, reduces the risk of traffic accidents caused by sign occlusion, and enhances road safety.
[0091] Based on the above embodiments, Figure 2 This is a system architecture diagram provided for an embodiment of the present invention. (See diagram below.) Figure 2 As shown, the data acquisition end includes a 4K HDR camera and a U-Blox M8N GPS. The 4K HDR camera is responsible for acquiring raw image data streams, providing high-resolution and high dynamic range image data, which provides the visual information foundation for subsequent analysis. The U-Blox M8N GPS outputs positioning information according to the NMEA-0183 protocol, which is used to provide geographic location data for the raw images. Both the acquired raw image data and the geographic location data are input into the model training platform.
[0092] The model training platform performs data augmentation on the original image data, including random cropping, rotation, and occlusion simulation, to expand the data volume and increase data diversity, thereby improving the model's generalization ability.
[0093] The model is trained using YOLOv8n (an efficient object detection algorithm) combined with CBAM (Convolutional Attention Module), i.e., YOLOv8n-CBAM. After training, the .rknn model is exported. The .rknn model is then deployed on edge computing devices.
[0094] The edge computing device uses Rockchip's RK3588 NPU as its hardware carrier, utilizing its neural network processing unit for computation; it employs multi-threaded scheduling to rationally allocate computing resources and improve processing efficiency; it can align video streams with GPS, aligning the video streams captured by the camera with the positioning information obtained by GPS in time and space, and using Rockchip's neural network computing acceleration tools to accelerate model inference.
[0095] When conducting real-time detection of traffic signs, the collected detection images and location information of the traffic signs can be transmitted to edge computing devices. The edge computing devices use the .rknn model to output JSON format results to the inspection platform to obtain detection results. The detection results include the occlusion status of the traffic signs and their location information. When a traffic sign is occluded, it can be displayed at the corresponding location on the electronic map, and a processing work order can be generated to remind the processing personnel, thereby processing the occlusion on the traffic signs, such as but not limited to leaves.
[0096] Therefore, this invention optimizes the YOLOv8n model for traffic sign occlusion scenarios, improving detection robustness in complex environments; it adopts a distance-GPS dual constraint mechanism: combining, for example, a 50-meter detection range threshold with precise positioning, to ensure that the detection results are highly matched with actual processing requirements; and it features a real-time edge system: a lightweight model and hardware acceleration technology to achieve low-power, high-real-time application.
[0097] By employing monocular ranging technology to limit the detection range and filtering out objects exceeding a distance threshold, false positives caused by distant obstructions (such as trees) are avoided, thus improving detection reliability. The optimized YOLOv8n model achieves high frame rate operation on edge devices, meeting the real-time requirements of road inspection. Detection results are linked to GPS information in real time to directly generate processing work orders, improving handling efficiency. Through this invention, the obstruction detection accuracy is ≥90% (actual data), the false detection rate within 50 meters is <5%, and the GPS positioning error is ≤2 meters. This reduces manual inspection costs, shortens problem response time, lowers the risk of traffic accidents caused by obstructed signs, and improves road safety.
[0098] Based on the same inventive concept, embodiments of the present invention also provide a device for detecting the occlusion status of traffic signs. Figure 3This is a schematic diagram of a traffic sign occlusion detection device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the first acquisition module 31 is used to acquire the detection image corresponding to the traffic sign within a preset distance collected by the acquisition device; the second acquisition module 32 is used to acquire the position information of the traffic sign based on the center pixel of the detection image and the GPS coordinate formula; the acquisition module 33 is used to transmit the detection image to the trained and optimized YOLOv8n model to acquire the occlusion state information of the traffic sign; and the output module 34 is used to bind the position information and occlusion state information of the traffic sign within the preset distance and output them as the detection result of the traffic sign.
[0099] The traffic sign occlusion detection device provided in the above embodiments can perform the traffic sign occlusion detection methods provided in the above embodiments and has the same or corresponding beneficial effects, which will not be described in detail here.
[0100] This invention also provides a storage medium that stores a program or instructions that cause a computer to execute the steps of the traffic sign occlusion detection method provided in the above embodiments.
[0101] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0102] Based on the above embodiments, this invention also provides an electronic device. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 4 As shown, the electronic device includes a processor 401 and a memory 402. The processor 401 executes programs or instructions stored in the memory, such as... Figure 1 The steps of the traffic sign occlusion detection method described above have the beneficial effects of the above embodiments, and will not be repeated here.
[0103] like Figure 4 As shown, an electronic device may include at least one processor 401, at least one memory 402, and at least one communication interface 403. The various components in the electronic device are coupled together via a bus system 404. The communication interface 403 is used for information transmission with external devices. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 4 The general designated all buses as Bus System 404.
[0104] It is understood that the memory 402 in this embodiment can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. In some embodiments, the memory 402 stores the following elements: executable units or data structures, or subsets thereof, or extended sets thereof, operating systems, and applications. In this embodiment of the invention, the processor 401 executes the steps of the various embodiments of the method provided in this embodiment of the invention by calling the programs or instructions stored in the memory 402.
[0105] The method provided in this embodiment of the invention can be applied to processor 401, or implemented by processor 401. Processor 401 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the hardware of processor 401 or by instructions in software form. The processor 401 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor.
[0106] The steps of the method provided in this embodiment of the invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software units in the decoding processor. The software units can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 402, and processor 401 reads the information in memory 402 and combines it with its hardware to complete the steps of the method.
[0107] The electronic device may also include one or more physical components to execute instructions generated by the processor 401 when performing the methods provided in this embodiment of the invention. Different physical components may be located within the electronic device or outside the electronic device, such as in a cloud server. Each physical component, together with the processor 401 and the memory 402, works to realize the functions of the electronic device in this embodiment.
[0108] The terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0109] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention is not limited to the specific combination of the above-described technical features, but also includes other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the foregoing inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions as those in the present invention.
Claims
1. A method for detecting the occlusion state of traffic signs, characterized in that, include: Acquire detection images of traffic signs within a preset distance collected by the acquisition device; The location information of the traffic sign is obtained based on the center pixel of the detected image and a GPS coordinate formula. The detected image is transmitted to the trained and optimized YOLOv8n model to obtain the occlusion status information of the traffic sign; The location information and occlusion status information of the traffic signs within a preset distance are bound together and output as the detection result of the traffic signs.
2. The method for detecting the occlusion state of traffic signs according to claim 1, characterized in that, The trained and optimized YOLOv8n model was obtained through the following method: Collect a dataset of detection image samples corresponding to the traffic signs under different weather and lighting conditions; The collected detection image sample dataset is input into the YOLOv8n model training platform; The detected image sample dataset is preprocessed. The YOLOv8n model was trained and optimized using the preprocessed detection images.
3. The method for detecting the occlusion state of traffic signs according to claim 2, characterized in that, Data preprocessing of the detected image sample dataset includes: The occlusion degree determination function is used to determine the occlusion state of the detected image; Based on the occlusion state of the detected images, the LabelImg tool is used to classify and label the detected image sample dataset. The classification labels include normal labels and occlusion labels. The detected images labeled as occlusion are randomly cropped, rotated, and their brightness adjusted, and complex occlusions are simulated using a generative adversarial network.
4. The method for detecting the occlusion state of traffic signs according to claim 3, characterized in that, The occlusion degree determination function is: in, The pixel area of the occluded region in the detected image. The total pixel area of the detected image; when If the image is in an occluded state, it is determined that the detected image is in a normal state; otherwise, it is determined that the detected image is in a normal state.
5. The method for detecting the occlusion state of traffic signs according to claim 4, characterized in that, The YOLOv8n model embeds a CBAM module to enhance the focus on occluded areas in the detected image.
6. The method for detecting the occlusion state of traffic signs according to claim 2, characterized in that, The YOLOv8n model uses CIoU Loss as the loss function during training and optimization. The loss function is as follows: in, The intersection-union ratio (IU) of the predicted bounding box and the ground truth bounding box. The distance between the center points of the predicted bounding box and the ground truth bounding box is the Euclidean distance. It is the diagonal length of the smallest rectangle that simultaneously encloses the predicted bounding box and the ground truth bounding box. For aspect ratio consistency, Here, b is the weighting coefficient, and b is the center point of the predicted bounding box. gt The center point of the true bounding box.
7. The method for detecting the occlusion state of traffic signs according to claim 1, characterized in that, The location information of the traffic sign is obtained based on the center pixel of the detected image and a GPS coordinate formula, including: The location information of the traffic sign is obtained by mapping the center pixel of the detected image to a GPS coordinate formula, which is: in, Location information for traffic signs. To collect the location information of the device. For pixel offset, This is the conversion ratio for the distance from the pixel to the ground.
8. A device for detecting the occlusion status of traffic signs, characterized in that, include: The first acquisition module is used to acquire the detection images of traffic signs within a preset distance collected by the acquisition device; The second acquisition module is used to acquire the location information of the traffic sign based on the center pixel of the detected image and a GPS coordinate formula; The module is used to transmit the detected image to the trained and optimized YOLOv8n model to obtain the occlusion status information of the traffic sign; The output module is used to bind the location information and occlusion status information of the traffic sign within a preset distance and output them as the detection result of the traffic sign.
9. An electronic device, characterized in that, It includes a processor and a memory, wherein the processor executes the steps of the traffic sign occlusion detection method as described in any one of claims 1 to 7 by calling a program or instruction stored in the memory.