Nighttime vehicle target detection method and system based on improved KSC-YOLOV5
By improving the KSC-YOLOV5 model, vehicle target detection and reminding the driver of night driving images, the problem of blurred vision caused by unstable light during night driving is solved, and the driver's judgment ability and vehicle safety are improved.
Patent Information
- Application Number
- CN202411002291.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-07-25
AI Technical Summary
During night driving, due to unstable lighting conditions, it is difficult for vehicle drivers to judge the locations of front, back, left and right vehicles in a timely and accurate manner, increasing the risk of traffic accidents.
The night vehicle object detection method based on the improved KSC-YOLOV5 is adopted. By acquiring night driving images, the improved YOLOV5 model is used to detect the vehicle object, determine the area where the vehicle target is located, and a reminder is issued to the driver to reduce the impact of light instability.
It effectively helps drivers to timely and accurately determine the location of surrounding vehicles during night driving, improves the safety of vehicles and reduces the risk of traffic accidents such as rear-end collisions and collisions.
Smart Images

Figure CN118942066B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of area target detection, and in particular to a nighttime vehicle target detection method and system based on an improved KSC-YOLOV5. Background Art
[0002] With the rapid advancement of urbanization and the booming automobile industry, the number of cars in cities continues to rise. While this trend improves people's travel convenience, it also brings increasingly severe traffic safety challenges, especially in the complex and changeable environment at night. Due to the instability of lighting conditions, the driving environment of vehicles is usually a low-brightness environment, and vehicle drivers often have blurred vision and blocked vision. These visual impairments increase the difficulty of vehicle drivers' perception of the surrounding environment. Vehicle drivers find it difficult to judge the positions of vehicles in front, behind, left and right in a timely and accurate manner, which can easily lead to rear-end collisions and other serious traffic accidents, and also significantly increase the risk of delayed judgment and reaction.
[0003] Therefore, a solution is urgently needed. Summary of the invention
[0004] The present invention provides a nighttime vehicle target detection method and system based on an improved KSC-YOLOV5, which acquire nighttime driving images, perform vehicle target detection on the nighttime driving images, obtain the area where the vehicle target is located in the nighttime driving images, and remind the vehicle driver based on the area where the vehicle target is located in the nighttime driving images, so as to avoid the vehicle driver being troubled by blurred vision and blocked vision caused by the low brightness environment caused by the instability of lighting conditions when driving at night, and help the driver to timely and accurately judge the positions of the front, rear, left and right vehicles, thereby improving the safety of vehicle driving.
[0005] The present invention provides a nighttime vehicle target detection method based on improved KSC-YOLOV5, comprising:
[0006] Acquire night-time driving images;
[0007] Based on the improved KSC-YOLOV5 model, vehicle target detection is performed on night driving images to obtain the area where the vehicle target is located in the night driving images;
[0008] Based on the area where the vehicle target is located in the night driving image, the vehicle driver is reminded.
[0009] Preferably, obtaining nighttime driving images includes:
[0010] Obtain the vehicle's driving position and direction;
[0011] Based on the driving position and driving direction of the vehicle, the necessary field of vision of the vehicle driver is determined from the city map;
[0012] Obtaining city light information within a preset distance around the vehicle's driving position;
[0013] Map city light information into city maps;
[0014] Divide the necessary visual range into multiple local visual ranges from the city map mapped with the city lighting information, and determine the lighting environment evaluation value of each local visual range;
[0015] Determine the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges from the image acquisition frequency library;
[0016] Generate a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges;
[0017] Based on the night driving image acquisition solution, night driving images are acquired.
[0018] Preferably, the determining the necessary field of vision of the vehicle driver from the city map based on the driving position and driving direction of the vehicle includes:
[0019] In the city map, a first ground circular range is determined with the driving position of the vehicle as the center and a preset radius length as the radius;
[0020] Determine a first semicircular range within a first circular range on the ground; a ray from the center of the circle toward the travel direction of the vehicle bisects the first semicircular range;
[0021] Determine the non-vehicle landing area within the first semicircle;
[0022] Determine the range of the sector-shaped area to be segmented from the range of the first semicircle; the non-vehicle landing area is within the sector-shaped area to be segmented, and two radial sides of the sector-shaped area to be segmented coincide with two tangent lines drawn from the center of the circle to the non-vehicle landing area;
[0023] The other area ranges in the first semicircle except the fan-shaped area range to be divided and the second semicircle range in the first ground circular range except the first semicircle range are taken as the necessary field of vision of the vehicle driver.
[0024] Preferably, the necessary visual field is divided into a plurality of local visual fields in the city map mapped from the city light information, and the lighting environment evaluation value of each local visual field is determined, including:
[0025] Determine the lighting influence range formed by mapping the city lighting information from the city map;
[0026] Determine the local impact range where the lighting impact range falls within the necessary field of view;
[0027] Draw two tangent lines from the center of the circle to the local influence range in the necessary visual field. The two tangent lines from the center of the circle to the local influence range and the radius edge of the necessary visual field divide the necessary visual field into multiple sector areas, and each sector area serves as a local visual field.
[0028] Traverse each local field of view in turn;
[0029] During each traversal, feature extraction is performed on the local influence range in the traversed local visual field, the local influence range in other local visual fields adjacent to the traversed fan-shaped area, and the relative position relationship between the local influence range in other local visual fields adjacent to the traversed fan-shaped area and the traversed local visual field to obtain multiple feature values;
[0030] Based on multiple eigenvalues, construct a light impact eigenvector of the traversed local field of view;
[0031] Determine the lighting environment evaluation value corresponding to the lighting impact feature vector from the evaluation value library.
[0032] Preferably, the method of generating a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges includes:
[0033] Obtaining a shooting space-image acquisition frequency table of the vehicle;
[0034] Determine the shooting space corresponding to the local field of view from the shooting space-image acquisition frequency table, and modify the frequency value corresponding to the shooting space in the shooting space-image acquisition frequency table to the corresponding image acquisition frequency;
[0035] Based on the shooting space-image acquisition frequency table whose frequency values are modified to the corresponding image acquisition frequencies, a nighttime driving image acquisition scheme is determined.
[0036] The present invention provides a nighttime vehicle target detection system based on an improved KSC-YOLOV5, comprising:
[0037] An image acquisition module, used to acquire nighttime driving images;
[0038] The target detection module is used to detect vehicle targets in night driving images based on the improved KSC-YOLOV5 model, and obtain the area where the vehicle targets are located in the night driving images;
[0039] The reminder module is used to remind the vehicle driver based on the area where the vehicle target is located in the night driving image.
[0040] Preferably, the image acquisition module acquires nighttime driving images, including:
[0041] Obtain the vehicle's driving position and direction;
[0042] Based on the driving position and driving direction of the vehicle, the necessary field of vision of the vehicle driver is determined from the city map;
[0043] Obtaining city light information within a preset distance around the vehicle's driving position;
[0044] Map city light information into city maps;
[0045] Divide the necessary visual range into multiple local visual ranges from the city map mapped with the city lighting information, and determine the lighting environment evaluation value of each local visual range;
[0046] Determine the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges from the image acquisition frequency library;
[0047] Generate a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges;
[0048] Based on the night driving image acquisition solution, night driving images are acquired.
[0049] Preferably, the image acquisition module determines the necessary field of view of the vehicle driver from the city map based on the vehicle's driving position and driving direction, including:
[0050] In the city map, a first ground circular range is determined with the driving position of the vehicle as the center and a preset radius length as the radius;
[0051] Determine a first semicircular range within a first circular range on the ground; a ray from the center of the circle toward the travel direction of the vehicle bisects the first semicircular range;
[0052] Determine the non-vehicle landing area within the first semicircle;
[0053] Determine the range of the sector-shaped area to be segmented from the range of the first semicircle; the non-vehicle landing area is within the sector-shaped area to be segmented, and two radial sides of the sector-shaped area to be segmented coincide with two tangent lines drawn from the center of the circle to the non-vehicle landing area;
[0054] The other area ranges in the first semicircle except the fan-shaped area range to be divided and the second semicircle range in the first ground circular range except the first semicircle range are taken as the necessary field of vision of the vehicle driver.
[0055] Preferably, the image acquisition module divides the necessary visual field into a plurality of local visual fields from the city map mapped with the city lighting information, and determines the lighting environment evaluation value of each local visual field, including:
[0056] Determine the lighting influence range formed by mapping the city lighting information from the city map;
[0057] Determine the local influence range of the lighting that falls within the necessary field of view;
[0058] Draw two tangent lines from the center of the circle to the local influence range in the necessary visual field. The two tangent lines from the center of the circle to the local influence range and the radius edge of the necessary visual field divide the necessary visual field into multiple sector areas, and each sector area serves as a local visual field.
[0059] Traverse each local field of view in turn;
[0060] During each traversal, feature extraction is performed on the local influence range in the traversed local visual field, the local influence range in other local visual fields adjacent to the traversed fan-shaped area, and the relative position relationship between the local influence range in other local visual fields adjacent to the traversed fan-shaped area and the traversed local visual field to obtain multiple feature values;
[0061] Based on multiple eigenvalues, construct a light impact eigenvector of the traversed local field of view;
[0062] Determine the lighting environment evaluation value corresponding to the lighting impact feature vector from the evaluation value library.
[0063] Preferably, the image acquisition module generates a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges, including:
[0064] Obtaining a shooting space-image acquisition frequency table of the vehicle;
[0065] Determine the shooting space corresponding to the local field of view from the shooting space-image acquisition frequency table, and modify the frequency value corresponding to the shooting space in the shooting space-image acquisition frequency table to the corresponding image acquisition frequency;
[0066] Based on the shooting space-image acquisition frequency table whose frequency values are modified to the corresponding image acquisition frequencies, a nighttime driving image acquisition scheme is determined.
[0067] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0068] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0070] Figure 1 It is a flow chart of a nighttime vehicle target detection method based on improved KSC-YOLOV5 in an embodiment of the present invention;
[0071] Figure 2 Schematic diagram of a nighttime vehicle target detection system based on improved KSC-YOLOV5 in an embodiment of the present invention. DETAILED DESCRIPTION
[0072] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0073] The present invention provides a nighttime vehicle target detection method based on improved KSC-YOLOV5, such as Figure 1 As shown, including:
[0074] Step S1: Acquire nighttime driving images;
[0075] Step S2: Based on the improved KSC-YOLOV5 model, vehicle target detection is performed on the night driving image to obtain the area where the vehicle target is located in the night driving image;
[0076] Step S3: Prompt the vehicle driver based on the area where the vehicle target is located in the night driving image.
[0077] Night driving images are images of the surrounding environment of a vehicle when it is driving at night. Based on the improved KSC-YOLOV5 model, vehicle target detection is performed on night driving images to obtain the area where the vehicle target is located in the night driving images. The area where the vehicle target is located can indicate the positions of other vehicles around the vehicle. Based on the area where the vehicle target is located in the night driving images, the vehicle driver is reminded.
[0078] For the improved KSC-YOLOV5 model, the attention mechanism SKAttention is first introduced into the Backbone layer of the original YOLOV5 model network structure. By generating multiple paths with different convolution kernel sizes, the corresponding neurons have different receptive field sizes, solving the information overlap and redundancy problems in the original YOLOV5 model. Secondly, the content-aware feature reorganization CARAFE is used to replace the upsampling operator of the original YOLOV5 model network structure to ensure the quality of the feature map after enlargement. Finally, SIOU is used as the loss function, the vector angle between the true box and the predicted box is introduced, and the vector angle between the expected regression is considered. By redefining the penalty metric, the shape information of the target box is more effectively utilized. This improvement helps to promote the fitting of the true box and the predicted box, so that the model can locate the defect position more accurately, and accelerate the convergence process of the model, thereby improving the model training speed and the accuracy of reasoning. The improved KSC-YOLOV5 model effectively overcomes the difficulties of insufficient lighting and vehicle blur in night environments, and realizes accurate detection of vehicles.
[0079] The present application acquires night driving images, performs vehicle target detection on the night driving images, obtains the area where the vehicle target is located in the night driving images, and reminds the vehicle driver based on the area where the vehicle target is located in the night driving images, so as to avoid the vehicle driver being troubled by blurred vision and blocked vision caused by the low brightness environment caused by the instability of lighting conditions when driving at night, and helps the driver to judge the positions of vehicles in front, behind, left and right in a timely and accurate manner, thereby improving the safety of vehicle driving.
[0080] In one embodiment, obtaining a nighttime driving image includes:
[0081] Obtain the vehicle's driving position and direction;
[0082] Based on the driving position and driving direction of the vehicle, the necessary field of vision of the vehicle driver is determined from the city map;
[0083] Obtaining city light information within a preset distance around the vehicle's driving position;
[0084] Map city light information into city maps;
[0085] Divide the necessary visual range into multiple local visual ranges from the city map mapped with the city lighting information, and determine the lighting environment evaluation value of each local visual range;
[0086] Determine the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges from the image acquisition frequency library;
[0087] Generate a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges;
[0088] Based on the night driving image acquisition solution, night driving images are acquired.
[0089] The driving position of the vehicle is the current position of the vehicle, and the driving direction is the current instantaneous moving direction of the vehicle; the city map is a map of the city where the vehicle is located; the necessary field of view of the vehicle driver is the range in which the vehicle driver currently needs to pay attention to whether there are other vehicles or other oncoming vehicles; the preset distance range around the driving position refers to a circular range with a radius of, for example, 300 meters with the driving position as the center; the city light information is the location, working status (such as whether it is working normally), and lighting range (such as lighting location area, etc.) of public lighting equipment in the city (such as street lights, lighting in public places, etc.). The city light information can be obtained through the Internet of Things technology; the city light information is mapped into the city map and represented in the city map. At this time, the necessary field of view in the city map is divided into A plurality of local visual fields are formed, and a lighting environment evaluation value of each local visual field is determined, the lighting environment evaluation value represents the quality of the nighttime lighting conditions within the local visual field, and the larger the lighting environment evaluation value is, the better the nighttime lighting conditions within the local visual field are; corresponding image acquisition frequencies are pre-set for different lighting environment evaluation values, and the larger the lighting environment evaluation value is, the better the nighttime lighting conditions within the local visual field are; the image acquisition frequency within the corresponding local visual field can be appropriately reduced under the premise of ensuring real-time monitoring, and the image acquisition frequency corresponding to each lighting environment evaluation value is lower; based on the image acquisition frequencies corresponding to each lighting environment evaluation value of each local visual field, a nighttime driving image acquisition plan is generated, the nighttime driving image acquisition plan is executed, and the nighttime driving image is acquired.
[0090] Generally, night driving images are mostly captured by multiple cameras installed on the vehicle at 360 degrees and at ultra-high frequency. However, with the changes in the driving position and driving direction of the vehicle in the city and the visibility of the night lighting in the city, the range of other vehicles and other vehicles that the driver needs to pay attention to is also very different. If the multiple cameras installed on the vehicle are still controlled to perform 360-degree ultra-high frequency shooting, the shooting resources of each camera are seriously wasted and the shooting power consumption of each camera is increased. The embodiment of the present invention can solve this problem. Based on the driving position and driving direction, the necessary field of view of the vehicle driver is determined. Based on the city lighting information, the necessary field of view is divided into multiple local field of view ranges, and the lighting environment evaluation value of each local field of view is determined. Based on the image acquisition frequency corresponding to each lighting environment evaluation value of each local field of view range, a night driving image acquisition scheme is generated, and the night driving image acquisition scheme is executed to acquire night driving images. There is no need to control multiple cameras installed on the vehicle to perform 360-degree ultra-high frequency shooting, which reduces the waste of shooting resources of each camera and reduces the shooting power consumption of each camera.
[0091] In one embodiment, the determining the necessary field of view of the vehicle driver from the city map based on the driving position and driving direction of the vehicle includes:
[0092] In the city map, a first ground circular range is determined with the driving position of the vehicle as the center and a preset radius length as the radius;
[0093] Determine a first semicircular range within a first circular range on the ground; a ray from the center of the circle toward the travel direction of the vehicle bisects the first semicircular range;
[0094] Determine the non-vehicle landing area within the first semicircle;
[0095] Determine the range of the sector-shaped area to be segmented from the range of the first semicircle; the non-vehicle landing area is within the sector-shaped area to be segmented, and two radial sides of the sector-shaped area to be segmented coincide with two tangent lines drawn from the center of the circle to the non-vehicle landing area;
[0096] The other area ranges in the first semicircle except the fan-shaped area range to be divided and the second semicircle range in the first ground circular range except the first semicircle range are taken as the necessary field of vision of the vehicle driver.
[0097] The preset radius length can be 5 meters; the non-vehicle landing area refers to an area where vehicles cannot land, such as: closed road sections, areas where the free space on the ground cannot accommodate general vehicles, etc.; the other areas within the first semicircle except the fan-shaped area to be divided require the vehicle driver to pay attention to whether there are other vehicles and the positions of other vehicles. In addition, the second semicircle except the first semicircle in the first ground circular area belongs to the rear-view blind spot of the vehicle driver when driving, and the vehicle driver also needs to pay attention to whether there are other vehicles and the positions of other vehicles. Therefore, the other areas within the first semicircle except the fan-shaped area to be divided and the second semicircle except the first semicircle in the first ground circular area are regarded as the necessary field of vision of the vehicle driver.
[0098] The embodiment of the present invention introduces a first semicircle range when determining the necessary field of vision of a vehicle driver from a city map based on the driving position and driving direction of the vehicle, and determines the range of a sector-shaped area to be divided in the first semicircle range based on the non-vehicle landing area. The other area ranges within the first semicircle range except the sector-shaped area to be divided and the second semicircle range except the first semicircle range in the first ground circular range are used as the necessary field of vision of the vehicle driver, which improves the rationality of determining the necessary field of vision of the vehicle driver and further improves the applicability of the system.
[0099] In one embodiment, the necessary visual range is divided into a plurality of local visual ranges in the city map mapped from the city light information, and the lighting environment evaluation value of each local visual range is determined, including:
[0100] Determine the lighting influence range formed by mapping the city lighting information from the city map;
[0101] Determine the local impact range where the lighting impact range falls within the necessary field of view;
[0102] Draw two tangent lines from the center of the circle to the local influence range in the necessary visual field. The two tangent lines from the center of the circle to the local influence range and the radius edge of the necessary visual field divide the necessary visual field into multiple sector areas, and each sector area serves as a local visual field.
[0103] Traverse each local field of view in turn;
[0104] During each traversal, feature extraction is performed on the local influence range in the traversed local visual field, the local influence range in other local visual fields adjacent to the traversed fan-shaped area, and the relative position relationship between the local influence range in other local visual fields adjacent to the traversed fan-shaped area and the traversed local visual field to obtain multiple feature values;
[0105] Based on multiple eigenvalues, construct a light impact eigenvector of the traversed local field of view;
[0106] Determine the lighting environment evaluation value corresponding to the lighting impact feature vector from the evaluation value library.
[0107] When the city light information is mapped into the city map, the light influence range will be formed. For example, if the working state of a public lighting device is normal operation and the lighting range is area A, then area A will be found in the city map and marked as the light influence range; the necessary field of view is obtained by segmenting the sector area to be segmented as mentioned above, and it will also have a radius edge; the eigenvalues include: the ratio of the area of the local influence range in the traversed local field of view to the area of the traversed local field of view, the area of the local influence range in other local field of view adjacent to the traversed sector area, the shortest straight-line distance between the local influence range in other local field of view adjacent to the traversed sector area and the traversed local field of view, etc.; based on multiple eigenvalues, a light influence feature vector is constructed in the form of a vector, and the evaluation value library has light environment evaluation values corresponding to different light influence feature vectors, which are constructed into a light influence feature vector. The higher the degree to which the traversed local field of view is affected by light, the greater the corresponding lighting environment evaluation value. For example, the multiple eigenvalues of the lighting influence feature vector are constructed as follows: the area ratio of the local influence range in the traversed local field of view to the traversed local field of view is 7 / 10, the area of the local influence range in other local field of view adjacent to the traversed fan-shaped area is 0.6 square meters, and the shortest straight-line distance between the local influence range in other local field of view adjacent to the traversed fan-shaped area and the traversed local field of view is 0.1 meter, which means that the traversed local field of view is highly affected by light, and the corresponding lighting environment evaluation value is 8; the lighting environment evaluation value corresponding to the lighting influence feature vector is determined from the evaluation value library, and after traversing each local field of view, the lighting environment evaluation value of each local field of view is obtained.
[0108] When dividing the necessary viewing range into multiple local viewing ranges and determining the lighting environment evaluation value of each local viewing range, the embodiment of the present invention determines the local influence range whose lighting influence range falls within the necessary viewing range, divides the necessary viewing range into multiple local viewing ranges based on two tangents drawn from the center of the circle to the local influence range and the radius edge of the necessary viewing range, constructs a lighting influence feature vector based on multiple feature values, and determines the lighting environment evaluation value corresponding to the lighting influence feature vector from the evaluation value library, thereby improving the rationality of dividing the necessary viewing range into multiple local viewing ranges, and further improving the accuracy and comprehensiveness of determining the lighting environment evaluation value of each local viewing range, thereby improving the applicability of the system.
[0109] In one embodiment, the generating of a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges includes:
[0110] Obtaining a shooting space-image acquisition frequency table of the vehicle;
[0111] Determine the shooting space corresponding to the local field of view from the shooting space-image acquisition frequency table, and modify the frequency value corresponding to the shooting space in the shooting space-image acquisition frequency table to the corresponding image acquisition frequency;
[0112] Based on the shooting space-image acquisition frequency table whose frequency values are modified to the corresponding image acquisition frequencies, a nighttime driving image acquisition scheme is determined.
[0113] The shooting space-image acquisition frequency table contains frequency values of the current image acquisition of the shooting space corresponding to different shooting spaces; if the local field of view is the ground range, its corresponding shooting space is the shooting space whose ground vertical projection area is the local field of view; after determining the shooting space corresponding to the local field of view, its corresponding frequency value is modified to the image acquisition frequency corresponding to the local field of view; after the frequency values are all modified to the corresponding image acquisition frequencies, the current shooting space-image acquisition frequency table is used as the night driving image acquisition plan.
[0114] The present invention provides a nighttime vehicle target detection system based on improved KSC-YOLOV5, such as Figure 2 As shown, including:
[0115] Image acquisition module 1, used to acquire nighttime driving images;
[0116] Target detection module 2 is used to detect vehicle targets in night driving images based on the improved KSC-YOLOV5 model, and obtain the area where the vehicle targets are located in the night driving images;
[0117] The reminder module 3 is used to remind the vehicle driver based on the area where the vehicle target is located in the night driving image.
[0118] The image acquisition module 1 acquires nighttime driving images, including:
[0119] Obtain the vehicle's driving position and direction;
[0120] Based on the driving position and driving direction of the vehicle, the necessary field of vision of the vehicle driver is determined from the city map;
[0121] Obtaining city light information within a preset distance around the vehicle's driving position;
[0122] Map city light information into city maps;
[0123] Divide the necessary visual range into multiple local visual ranges from the city map mapped with the city lighting information, and determine the lighting environment evaluation value of each local visual range;
[0124] Determine the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges from the image acquisition frequency library;
[0125] Generate a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges;
[0126] Based on the night driving image acquisition solution, night driving images are acquired.
[0127] The image acquisition module 1 determines the necessary field of view of the vehicle driver from the city map based on the vehicle's driving position and driving direction, including:
[0128] In the city map, a first ground circular range is determined with the driving position of the vehicle as the center and a preset radius length as the radius;
[0129] Determine a first semicircular range within a first circular range on the ground; a ray from the center of the circle toward the travel direction of the vehicle bisects the first semicircular range;
[0130] Determine the non-vehicle landing area within the first semicircle;
[0131] Determine the range of the sector-shaped area to be segmented from the range of the first semicircle; the non-vehicle landing area is within the sector-shaped area to be segmented, and two radial sides of the sector-shaped area to be segmented coincide with two tangent lines drawn from the center of the circle to the non-vehicle landing area;
[0132] The other area ranges in the first semicircle except the fan-shaped area range to be divided and the second semicircle range in the first ground circular range except the first semicircle range are taken as the necessary field of vision of the vehicle driver.
[0133] The image acquisition module 1 divides the necessary visual field into a plurality of local visual fields from the city map mapped with the city light information, and determines the respective lighting environment evaluation values of the local visual fields, including:
[0134] Determine the lighting influence range formed by mapping the city lighting information from the city map;
[0135] Determine the local impact range where the lighting impact range falls within the necessary field of view;
[0136] Draw two tangent lines from the center of the circle to the local influence range in the necessary visual field. The two tangent lines from the center of the circle to the local influence range and the radius edge of the necessary visual field divide the necessary visual field into multiple sector areas, and each sector area serves as a local visual field.
[0137] Traverse each local field of view in turn;
[0138] During each traversal, feature extraction is performed on the local influence range in the traversed local visual field, the local influence range in other local visual fields adjacent to the traversed fan-shaped area, and the relative position relationship between the local influence range in other local visual fields adjacent to the traversed fan-shaped area and the traversed local visual field to obtain multiple feature values;
[0139] Based on multiple eigenvalues, construct a light impact eigenvector of the traversed local field of view;
[0140] Determine the lighting environment evaluation value corresponding to the lighting impact feature vector from the evaluation value library.
[0141] The image acquisition module 1 generates a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges, including:
[0142] Obtaining a shooting space-image acquisition frequency table of the vehicle;
[0143] Determine the shooting space corresponding to the local field of view from the shooting space-image acquisition frequency table, and modify the frequency value corresponding to the shooting space in the shooting space-image acquisition frequency table to the corresponding image acquisition frequency;
[0144] Based on the shooting space-image acquisition frequency table whose frequency values are modified to the corresponding image acquisition frequencies, a nighttime driving image acquisition scheme is determined.
[0145] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A nighttime vehicle target detection method based on improved KSC-YOLOV5, characterized in that: include: Acquire night-time driving images; Based on the improved KSC-YOLOV5 model, vehicle target detection is performed on night driving images to obtain the area where the vehicle target is located in the night driving images; Prompt the vehicle driver based on the area where the vehicle target is located in the night driving image; For the improved KSC-YOLOV5 model, firstly, the attention mechanism SKAttention is introduced into the Backbone layer of the original YOLOV5 model network structure. By generating multiple paths with different convolution kernel sizes, the corresponding neurons have different receptive field sizes. Secondly, the content-aware feature reorganization CARAFE is used to replace the upsampling operator of the original YOLOV5 model network structure of the model. Finally, SIOU is used as the loss function to introduce the vector angle between the real box and the predicted box; Acquire night-time driving images, including: Obtain the vehicle's driving position and direction; Based on the driving position and driving direction of the vehicle, the necessary field of vision of the vehicle driver is determined from the city map; Obtaining city light information within a preset distance around the vehicle's driving position; Map city light information into city maps; Divide the necessary visual range into multiple local visual ranges from the city map mapped with the city lighting information, and determine the lighting environment evaluation value of each local visual range; Determine the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges from the image acquisition frequency library; Generate a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges; Based on the night driving image acquisition solution, night driving images are acquired.
2. The nighttime vehicle target detection method based on improved KSC-YOLOV5 as claimed in claim 1, characterized in that: The determining of the necessary field of vision of the vehicle driver from the city map based on the driving position and driving direction of the vehicle includes: In the city map, a first ground circular range is determined with the driving position of the vehicle as the center and a preset radius length as the radius; Determine a first semicircular range within a first circular range on the ground; a ray from the center of the circle toward the travel direction of the vehicle bisects the first semicircular range; Determine the non-vehicle landing area within the first semicircle; Determine the range of the sector-shaped area to be segmented from the range of the first semicircle; the non-vehicle landing area is within the sector-shaped area to be segmented, and two radial sides of the sector-shaped area to be segmented coincide with two tangent lines drawn from the center of the circle to the non-vehicle landing area; The other area ranges in the first semicircle except the fan-shaped area range to be divided and the second semicircle range in the first ground circular range except the first semicircle range are taken as the necessary field of vision of the vehicle driver.
3. The nighttime vehicle target detection method based on improved KSC-YOLOV5 as claimed in claim 2, characterized in that: The necessary visual range is divided into a plurality of local visual ranges in the city map mapped from the city light information, and the lighting environment evaluation value of each local visual range is determined, including: Determine the lighting influence range formed by mapping the city lighting information from the city map; Determine the local influence range of the lighting that falls within the necessary field of view; Draw two tangent lines from the center of the circle to the local influence range in the necessary visual field. The two tangent lines from the center of the circle to the local influence range and the radius edge of the necessary visual field divide the necessary visual field into multiple sector areas, and each sector area serves as a local visual field. Traverse each local field of view in turn; During each traversal, feature extraction is performed on the local influence range in the traversed local visual field, the local influence range in other local visual fields adjacent to the traversed fan-shaped area, and the relative position relationship between the local influence range in other local visual fields adjacent to the traversed fan-shaped area and the traversed local visual field to obtain multiple feature values; Based on multiple eigenvalues, construct a light impact eigenvector of the traversed local field of view; Determine the lighting environment evaluation value corresponding to the lighting impact feature vector from the evaluation value library.
4. The nighttime vehicle target detection method based on improved KSC-YOLOV5 as claimed in claim 1, characterized in that: The method of generating a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges includes: Obtaining a shooting space-image acquisition frequency table of the vehicle; Determine the shooting space corresponding to the local field of view from the shooting space-image acquisition frequency table, and modify the frequency value corresponding to the shooting space in the shooting space-image acquisition frequency table to the corresponding image acquisition frequency; Based on the shooting space-image acquisition frequency table whose frequency values are modified to the corresponding image acquisition frequencies, a nighttime driving image acquisition scheme is determined.
5. Nighttime vehicle target detection system based on improved KSC-YOLOV5, characterized by: include: An image acquisition module, used to acquire nighttime driving images; The target detection module is used to detect vehicle targets in night driving images based on the improved KSC-YOLOV5 model, and obtain the area where the vehicle targets are located in the night driving images; A reminder module, used to remind the vehicle driver based on the area where the vehicle target is located in the night driving image; For the improved KSC-YOLOV5 model, firstly, the attention mechanism SKAttention is introduced into the Backbone layer of the original YOLOV5 model network structure. By generating multiple paths with different convolution kernel sizes, the corresponding neurons have different receptive field sizes. Secondly, the content-aware feature reorganization CARAFE is used to replace the upsampling operator of the original YOLOV5 model network structure of the model. Finally, SIOU is used as the loss function to introduce the vector angle between the real box and the predicted box. The image acquisition module is used to acquire nighttime driving images, and includes: Obtain the vehicle's driving position and direction; Based on the driving position and driving direction of the vehicle, the necessary field of vision of the vehicle driver is determined from the city map; Obtaining city light information within a preset distance around the vehicle's driving position; Map city light information into city maps; Divide the necessary visual range into multiple local visual ranges from the city map mapped with the city lighting information, and determine the lighting environment evaluation value of each local visual range; Determine the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges from the image acquisition frequency library; Generate a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges; Based on the night driving image acquisition solution, night driving images are acquired.
6. The nighttime vehicle target detection system based on improved KSC-YOLOV5 as claimed in claim 5, characterized in that: The determining of the necessary field of vision of the vehicle driver from the city map based on the driving position and driving direction of the vehicle includes: In the city map, a first ground circular range is determined with the driving position of the vehicle as the center and a preset radius length as the radius; Determine a first semicircular range within a first circular range on the ground; a ray from the center of the circle toward the travel direction of the vehicle bisects the first semicircular range; Determine the non-vehicle landing area within the first semicircle; Determine the range of the sector-shaped area to be segmented from the range of the first semicircle; the non-vehicle landing area is within the sector-shaped area to be segmented, and two radial sides of the sector-shaped area to be segmented coincide with two tangent lines drawn from the center of the circle to the non-vehicle landing area; The other area ranges in the first semicircle except the fan-shaped area range to be divided and the second semicircle range in the first ground circular range except the first semicircle range are taken as the necessary field of vision of the vehicle driver.
7. The nighttime vehicle target detection system based on improved KSC-YOLOV5 as claimed in claim 6, characterized in that: The necessary visual range is divided into a plurality of local visual ranges in the city map mapped from the city light information, and the lighting environment evaluation value of each local visual range is determined, including: Determine the lighting influence range formed by mapping the city lighting information from the city map; Determine the local impact range of the lighting that falls within the necessary field of view; Draw two tangent lines from the center of the circle to the local influence range in the necessary visual field. The two tangent lines from the center of the circle to the local influence range and the radius edge of the necessary visual field divide the necessary visual field into multiple sector areas, and each sector area serves as a local visual field. Traverse each local field of view in turn; During each traversal, feature extraction is performed on the local influence range in the traversed local visual field, the local influence range in other local visual fields adjacent to the traversed fan-shaped area, and the relative position relationship between the local influence range in other local visual fields adjacent to the traversed fan-shaped area and the traversed local visual field to obtain multiple feature values; Based on multiple eigenvalues, construct a light impact eigenvector of the traversed local field of view; Determine the lighting environment evaluation value corresponding to the lighting impact feature vector from the evaluation value library.
8. The nighttime vehicle target detection system based on improved KSC-YOLOV5 as claimed in claim 5, characterized in that: The method of generating a nighttime driving image acquisition scheme based on the image acquisition frequencies corresponding to the respective lighting environment evaluation values of the respective local visual field ranges includes: Obtaining a shooting space-image acquisition frequency table of the vehicle; Determine the shooting space corresponding to the local field of view from the shooting space-image acquisition frequency table, and modify the frequency value corresponding to the shooting space in the shooting space-image acquisition frequency table to the corresponding image acquisition frequency; Based on the shooting space-image acquisition frequency table whose frequency values are modified to the corresponding image acquisition frequencies, a nighttime driving image acquisition scheme is determined.
Citation Information
Patent Citations
Multi-target detection and tracking method based on improved YOLO V5-s
CN116580364A
PCB defect detection method based on improved YOLO v5 algorithm
CN117351288A