A vehicle target detection method based on LLC-YOLO algorithm
Through the LLC-YOLO algorithm, the LLC-Net network is used for low-light enhancement and feature extraction, combined with the CMCF-Neck network and the exclusion loss function, the problem of low accuracy of vehicle target detection in dark environments is solved, and more efficient vehicle target recognition is achieved.
Patent Information
- Application Number
- CN202410384762.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-01
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-04-01
AI Technical Summary
The existing deep learning-based vehicle target detection model has reduced detection accuracy in dark environments and is difficult to effectively identify vehicle targets in dark images.
The LLC-YOLO algorithm is introduced, low-light enhancement is performed through the LLC-Net network, and the potential information of dark images is extracted by combining the adaptive low-pass filter and the detail feature extraction module. The CMCF-Neck network is introduced into the YOLOv5 network for feature fusion, and the exclusion loss function is used to optimize the detection results.
It improves the accuracy and speed of vehicle target detection in dark environments, reduces false detections, and enhances detection accuracy in complex environments.
Smart Images

Figure CN118172541B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, mainly to target detection, unmanned driving, intelligent transportation and other technologies, and specifically refers to vehicle target detection based on the LLC-YOLO algorithm. Background Art
[0002] With the rapid development of autonomous driving technology, smart cars have gradually become a focus of global experts and scholars in related fields, and vehicle detection is a key issue. Based on different detection principles, vehicle detection research methods can be roughly divided into three categories: feature-based detection methods, traditional machine learning-based detection methods, and deep learning-based detection methods. Feature-based detection methods primarily detect vehicles based on the appearance characteristics of the vehicle ahead. Common appearance features include color, edge features, symmetry features, and bottom shadow features. Traditional machine learning-based detection methods first use feature description operators to extract the features of the vehicle ahead, then apply machine learning algorithms to train samples, and finally select an appropriate feature classifier to achieve vehicle detection. However, both feature-based detection methods and traditional machine learning-based detection methods have significant limitations in detection accuracy and speed.
[0003] In recent years, deep learning-based object detection methods have gradually become a research hotspot for experts worldwide and have been widely used in fields such as object detection, smart transportation, and autonomous driving. Most deep learning-based vehicle object detection methods use neural networks as their backbone network. Compared to traditional feature extraction methods, neural networks can autonomously learn the feature information of objects in images, extract high-level semantic features, and have stronger feature expression capabilities. However, when the scene switches to night, the quality of images acquired in the absence of sufficient lighting will degrade, such as low contrast, weak brightness, high noise, and blurred details. Therefore, directly using existing object detection models to detect dark images will result in a decrease in detection accuracy, thereby placing higher requirements and challenges on the task of vehicle object detection in dark environments. Summary of the Invention
[0004] To address the shortcomings of the existing technology, the present invention proposes a vehicle target detection method based on the LLC-YOLO algorithm and introduces a low-light enhancement network LLC-Net for preprocessing dark images. The LLC-Net network extracts potential information of different scales in dark images through a Laplacian pyramid structure, and then enhances the features of images of different scales through an adaptive low-pass filter and a detail feature extraction module, thereby improving the detection accuracy of the model in dark environments.
[0005] In order to solve the above technical problems, the technical solution of the present invention is:
[0006] A vehicle target detection based on the LLC-YOLO algorithm includes the following steps:
[0007] Step 1: Obtain an image dataset and filter it through a script to obtain images labeled as night. Then, convert the label file from JSON format to YOLO format.
[0008] Step 2: Build an LLC-YOLO model. The LLC-YOLO model includes LLC-Net, backbone network, neck network CMCF-Neck, and head. The backbone network uses YOLOv5. The CMCF-Neck uses the YOLOv5 neck network as the main network architecture. In the C3 module of the YOLOv5 neck network, CMConv convolution is used instead of ordinary convolution Conv to reconstruct it into the M3 module.
[0009] The convolution structure of the CMConv takes a feature with c1 input channels, changes the number of channels to c2 / 2 through ordinary convolution, then obtains a feature map of c2 / 2 through depthwise separable convolution, connects the outputs of ordinary convolution and depthwise separable convolution through Concat, and then uses Shuffle operation to match and connect the corresponding channels of ordinary convolution and depthwise separable convolution together to obtain a feature map with c2 output channels;
[0010] In the above technical solution, a depthwise separable convolution based on channel fusion is introduced into the neck network of YOLOv5. The depthwise separable convolution based on channel fusion matches the channels of the depthwise separable convolution and the ordinary convolution and cross-fuses them. On the basis of matching the number of channels, the information of the ordinary convolution Conv is evenly integrated into the output of the depthwise separable convolution, thereby reducing the number of parameters while ensuring detection accuracy.
[0011] Step 3: Perform low-light enhancement on the selected night images through LLC-Net;
[0012] Step 4: Extract features from the low-light enhanced image through the backbone;
[0013] Step 5: Perform feature fusion between channels through CMCF-Neck;
[0014] Step 6: Output the detection results through the head.
[0015] Preferably, after preprocessing, the dataset is divided into a training set, a validation set and a test set in a ratio of 8:1:1.
[0016] Preferably, the method for low-light enhancement in step 3 is: dividing the input image into feature maps L0, L1, L2, and L3 of different scales through the Laplacian pyramid in LLC-Net; using the image enhancement module in LLC-Net on the feature maps Li (i=0, 1, 2, 3) of different scales to process potential semantic features; in a bottom-up manner, the output of the image enhancement module with L3 as input is connected to the output of the image enhancement module with L2 as input after upsampling, and in this way, the image enhancement module with L0 as the final input is recursively raised to obtain feature maps containing information of different scales.
[0017] In the above technical solution, a low-light enhancement network LLC-Net is introduced to preprocess dark images. The LLC-Net network extracts potential information of different scales in dark images through the Laplacian pyramid structure, and then enhances the features of images of different scales through an adaptive low-pass filter and a detail feature extraction module, thereby improving the detection accuracy of the model in dark environments.
[0018] Preferably, the image enhancement module includes an adaptive low-pass filter and an edge information extraction module connected via Concat.
[0019] Preferably, the adaptive low-pass filter is implemented as follows:
[0020] In images of different scales, an adaptive low-pass filter is used to capture low-frequency information in each channel, and average pooling of 1*1, 2*2, 3*3, and 6*6 is used for feature filtering, allowing only information below the cutoff frequency to pass. The formula is as follows:
[0021] Filter(f i )=Up(β s (f i ))
[0022] where f i Indicates that it is part of the channelsplit output, Up is bilinear interpolation sampling, β s It is the adaptive average pooling of different sizes s×s.
[0023] Preferably, the edge information extraction module includes an upper and lower branch structure and an edge branch structure.
[0024] The upper and lower branch structures are defined as:
[0025] CB(x)=x+γ(F1(x1))
[0026] Where x1 = σ(F2(x)).x, x is the input feature, F is the 3*3 convolutional layer, γ is the LeakyReLU, and σ is the Softmax function;
[0027] The edge branch structure is defined as:
[0028] EB(x)=F3(Canny h (x)+Canny w (x))+x
[0029] Among them, x is the input feature, Canny h and Canny w They are edge operations in the vertical and horizontal directions respectively, and F is a 3*3 convolutional layer.
[0030] Preferably, the CMConv convolution parameter amount is:
[0031] Flops1=whk1.k2.c1 / 2+c2 / 2
[0032] Among them, w is the width of the output feature map, h is the height of the output feature map, k1 and k2 are the sizes of the convolution kernels, which are 3*3. c1 is the number of channels of each convolution kernel, which is also the number of channels of the input feature map, and c2 is the number of channels of the output feature map.
[0033] Preferably, the loss function expression during the LLC-YOLO model training is as follows:
[0034] L=L(x,c,l,g)+γL RepGT
[0035] Among them, L RepGT is the rejection loss, γ is the weight coefficient, which is used to balance the auxiliary loss, and P + = {P}, represents the set of all candidate boxes whose IoU with the real box is greater than 0.5, G + ={G} represents the set of all ground-truth boxes;
[0036] The rejection loss can be calculated by the following formula:
[0037]
[0038] In the above technical solution, in order to further improve the detection accuracy of the model, the present invention introduces the exclusion loss into the loss function. The exclusion loss aims to repel the candidate box from the adjacent real boxes other than the specified target, suppress the interference of the adjacent candidate box on the real target box, and better obtain the accurate position of the target.
[0039] Preferably, the LLC-YOLO model deployment environment is: cuda11.3, deep learning framework pytorch1.12.1, Intel core i9-13900ks CPU, 128G memory, GPU is NVIDIA GeForce RTX 4090, and the video memory is 24G; during training, the number of training rounds is set to 100, and the batch size of each training input is 16 images. The training process is observed through tensorboard during the training process. After the training is completed, the trained weights are saved.
[0040] The present invention has the following characteristics and beneficial effects:
[0041] (1) In order to improve the detection accuracy of vehicle targets in dark environments, the present invention first introduces the LLC-Net network before the YOLOv5 network model, which improves the model's detection effect in dark environments; secondly, in order to further improve the detection accuracy, an adaptive low-pass filter and an edge detection module are introduced into LLC-Net, which can obtain more comprehensive and accurate context information and edge information.
[0042] (2) In order to improve the detection speed without losing the detection accuracy, the present invention introduces the CMCF-Neck network into the neck network. The channel fusion-based depthwise separable convolution in CMCF-Neck integrates the advantages of ordinary convolution and depthwise separable convolution, so that the output retains the semantic information while significantly reducing the number of parameters.
[0043] (3) In order to further improve the detection accuracy in complex environments, the present invention introduces defect loss into the loss function to suppress the candidate box with the largest IoU around the pre-selected box of the detection target and the real box, so that the pre-selected box is closer to the real box and the probability of false detection is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 This is a network model structure diagram based on LLC-YOLO in this embodiment.
[0046] Figure 2 This is the LLC-Net network structure diagram.
[0047] Figure 3 This is the structure diagram of the adaptive low-pass filter.
[0048] Figure 4 This is the structural diagram of the detail feature extraction module.
[0049] Figure 5 This is the CMCF-Neck neck network structure diagram.
[0050] Figure 6 This is the CMConv convolution structure diagram.
[0051] Figure 7(a) and Figure 7(b) are the comparisons between the original model and the improved model. Figure 1 .
[0052] Figure 8(a) and Figure 8(b) are the comparisons between the original model and the improved model. Figure 2 . DETAILED DESCRIPTION
[0053] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0054] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0055] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0056] The present invention provides a vehicle target detection based on the LLC-YOLO algorithm, comprising the following steps:
[0057] Step 1: Obtain an image dataset and filter it using a script to obtain images labeled as night. Then, convert the label file from JSON format to YOLO format.
[0058] Specifically, this example uses the BDD100K dataset for road object detection. This dataset features rich geographic, environmental, and weather diversity. The dataset includes approximately 100,000 traffic scene images, covering object categories such as buses, traffic lights, traffic signs, people, bicycles, trucks, motorcycles, cars, and trains. Approximately 80,000 of these images are annotated with 2D bounding boxes. Labels for different weather conditions and time of day are also included, including sunny, cloudy, rainy, daytime, and nighttime. This provides a rich data sample for training and validation, paving the way for a wide range of application scenarios.
[0059] Furthermore, the present invention uses the BDD100K dataset for vehicle detection tasks, with a particular focus on vehicle detection in dark environments. To meet this requirement, the present invention screened out 31,506 images labeled as night from the training and validation sets. Next, the label file was converted from JSON format to YOLO format, and the 12 instance targets in the image were renumbered, with cars, buses, and trucks selected as research objects. Finally, the resulting dataset was divided into training, validation, and test sets in a ratio of 8:1:1 for training and evaluation of the YOLOv5 algorithm.
[0060] Step 2: Build the LLC-YOLO model, which includes LLC-Net, backbone network backbone, neck network CMCF-Neck and head.
[0061] Furthermore, the configuration model yaml file was modified. First, the label categories in the YOLOv5s.yaml file in the data folder were changed to be consistent with the labels in this invention. Then, the training paths of train and val were replaced with the paths under the current dataset. Then, parameters such as the number of training epochs and batch-size under train.py were modified according to the requirements of the invention. The environment of the present invention is: cuda11.3, deep learning framework pytorch1.12.1, Intel core i9-13900ks CPU, 128G memory, and GPU is NVIDIA GeForce RTX 4090 with 24G video memory.
[0062] Specifically, such as Figure 1As shown, the backbone network backbone applies YOLOv5, and the CMCF-Neck uses the YOLOv5 neck network as the main network architecture. In the C3 module of the YOLOv5 neck network, CMConv convolution is used to replace the ordinary convolution Conv and reconstructed into the M3 module;
[0063] Among them, the convolution structure of the CMConv inputs features with c1 channels, changes the number of channels to c2 / 2 through ordinary convolution, and then obtains a c2 / 2 feature map through depth-wise separable convolution. The outputs of ordinary convolution and depth-wise separable convolution are connected through Concat, and then the corresponding channels of ordinary convolution and depth-wise separable convolution are matched and connected together using the Shuffle operation to obtain a feature map with c2 output channels.
[0064] In the above technical solution, the input image is first preprocessed through LLC-Net, followed by feature extraction through the backbone network. Subsequently, feature fusion is performed in the CMCF-Neck module through a bottom-up and top-down transmission path, and finally the head outputs the detection result.
[0065] In the neck network of YOLOv5, a depth-wise separable convolution based on channel fusion is introduced. The depth-wise separable convolution based on channel fusion matches the channels of the depth-wise separable convolution and the ordinary convolution and cross-fuses them. On the basis of matching the number of channels, the information of the ordinary convolution Conv is evenly integrated into the output of the depth-wise separable convolution, reducing the number of parameters while ensuring detection accuracy.
[0066] Step 3: Use LLC-Net to perform low-light enhancement on the selected night images.
[0067] Specifically, in order to obtain a better training effect in a dark environment, a low-light enhancement network LLC-Net is designed in front of the backbone. The network structure is shown in the attached figure. Figure 2 As shown, LCC-Net divides the image into feature maps L0, L1, L2, and L3 of different scales through the Laplacian pyramid. Feature maps of different scales are the main content processed by the present invention. An image enhancement module is used to process potential semantic features on feature maps Li (i=0, 1, 2, 3) of different scales. Specifically, the image enhancement module includes an adaptive low-pass filter and an edge information extraction module. The outputs of the two are connected through Concat, and then the enhanced feature maps in different scales are obtained through convolution. The output after upsampling in the L3 layer and the output of the L2 layer are connected together through a bottom-up structure, and this structure is recursively applied upward to finally obtain a feature map containing information of different scales in the L0 layer. Among them, the adaptive low-pass filter is shown in the attached figure. Figure 3As shown in the attached Figure 4 shown.
[0068] In images of different scales, low-frequency information contains most of the semantic information in the image, which is the key to detector prediction. The LLC-Net network uses an adaptive low-pass filter to capture low-frequency information in each channel and uses 1*1, 2*2, 3*3, and 6*6 average pooling for feature filtering, allowing only information below the cutoff frequency to pass. The adaptive low-pass filter structure is as follows Figure 3 As shown, the formula is as follows:
[0069] Filter(f i )=Up(β s (f i )) (1)
[0070] where f i Indicates that it is part of the channelsplit output, Up is bilinear interpolation sampling, β s is an adaptive average pooling of different sizes s×s. Specifically, the input feature f∈R h×w×32 First, it is converted to f∈R through a 1*1 convolutional layer. h ×w×32 , Then, f is divided into four channels, namely {f1,f2,f3,f4}, through channelsplit, and then adaptive low-pass filtering is performed on each channel using pooling operations of different sizes. Then all channels are connected together through Concat, and finally the number of output channels is changed through a 1*1 convolutional layer.
[0071] In order to extract richer feature information, the present invention uses a dual-branch structure to construct a detail feature extraction module at different scales. One branch uses a residual structure to obtain feature information of different dimensions and transmit rich contextual low-frequency information; the other branch uses the Canny operator to extract edge information in different directions. The structure of the detail feature extraction module is shown in the attached figure. Figure 4 As shown. The upper and lower branch structures are defined as:
[0072] CB(x)=x+γ(F1(x1)) (2)
[0073] Here, x1 = σ(F2(x)).x, where x is the input feature, F is the 3x3 convolutional layer, γ is the LeakyReLU, and σ is the Softmax function. Specifically, with the residual structure, the input feature passes through a 3x3 convolutional layer and a Softmax function to increase the number of feature channels from 3 to 32. It then passes through another 3x3 convolutional layer and a LeakyReLU function to reduce the number of feature channels from 32 to 3.
[0074] The edge branch structure is defined as:
[0075] EB(x)=F3(Canny h (x)+Canny w (x))+x (3)
[0076] Among them, x is the input feature, Canny h and Canny w They are edge operations in the vertical and horizontal directions respectively, and F is a 3*3 convolution layer. Specifically, Canny operations are performed on the input feature x in the h and w directions respectively, and then the two are fused and convolved with the input feature x. The obtained output and the output of the upper and lower branch structures are connected through Concat.
[0077] In the above technical solution, a low-light enhancement network LLC-Net is introduced to preprocess dark images. The LLC-Net network extracts potential information of different scales in dark images through the Laplacian pyramid structure, and then enhances the features of images of different scales through an adaptive low-pass filter and a detail feature extraction module, thereby improving the detection accuracy of the model in dark environments.
[0078] Step 4: Use backbone to extract features from the low-light enhanced image.
[0079] It should be noted that the backbone consists of a sequentially connected Convolutional Layer (Conv), Convolutional Layer (Conv), C3 module, Convolutional Layer (Conv), C3 module, Convolutional Layer (Conv), C3 module, Convolutional Layer (Conv), C3 module, and SPFF module. YOLOv5 is a conventional network, so the working principle is not explained in detail here.
[0080] Step 5: Perform feature fusion between channels through CMCF-Neck.
[0081] Specifically, in order to improve the speed of vehicle detection without losing accuracy, the present invention cross-integrates depthwise separable convolution with ordinary convolution, introduces channel-fused depthwise separable convolution CMConv into the YOLOv5 neck network, and CMConv fuses the output of ordinary convolution Conv into the output of depthwise separable convolution DSC. In the neck network of YOLOv5, CMConv is used to replace ordinary convolution, and a new module M3 is formed through the residual structure to form an improved CMCF-Neck network. Among them, the CMConv convolution structure is attached Figure 6 Instructions.
[0082] The details of the CMCF-Neck network structure are as follows Figure 5The network inputs P3, P4, and P5 are the outputs of the second-layer C3 module, the third-layer C3 module, and the SPPF module in the YOLOv5 backbone network, respectively. The right side of the figure shows the designed CMConv convolution introduced into the C3 module, replacing the regular convolution, and reconstructing it into the M3 module. Depthwise separable convolution improves the model's detection speed, but it also reduces its accuracy. The designed CMConv fuses the channel-by-channel features of the outputs of depthwise separable convolution and regular convolution.
[0083] The CMConv convolution structure is as follows Figure 6 As shown in the figure, the input channel number is c1. The number of channels is reduced to c2 / 2 through ordinary convolution. Then, a c2 / 2 feature map is obtained through depthwise separable convolution. The outputs of the ordinary convolution and depthwise separable convolution are connected through Concat. Then, the corresponding channels of the ordinary convolution and depthwise separable convolution are matched and connected together using Shuffle operation, resulting in a feature map with c2 output channels. CMConv's feature extraction capability is similar to that of ordinary convolution, but the number of parameters of CMConv is nearly half that of ordinary convolution. The specific parameter comparison is shown below:
[0084] Ordinary convolution parameter amount:
[0085] Flops1=whk1.k2.c1.c2 / 2 (4) CMConv convolution parameter amount:
[0086] Flops1=whk1.k2.c1 / 2+c2 / 2 (5)
[0087] Where w is the width of the output feature map, h is the height of the output feature map, k1 and k2 are the sizes of the convolution kernels, which are 3*3. c1 is the number of channels of each convolution kernel, which is also the number of channels of the input feature map. c2 is the number of channels of the output feature map. c1 and c2 are generally 32, 64, 128, 256, or 512. When c2 is large enough, Flops1 is nearly twice as large as Flops2.
[0088] Step 6: Output the detection results through the head.
[0089] In a further configuration of this embodiment, in order to improve the detection effect of the model in dense traffic scenes or when the object is severely occluded, a rejection loss is added to the loss function. The improved loss function can be expressed by the following formula:
[0090] L=L(x,c,l,g)+γL RepGT (6)
[0091] Among them, L RepGTis the rejection loss, γ is the weight coefficient, which is used to balance the auxiliary loss, and P + = {P}, represents the set of all candidate boxes whose IoU with the real box is greater than 0.5, G + = {G} represents the set of all true boxes. For any candidate box P∈P + , let the real box with the largest IoU be its designated target, that is:
[0092]
[0093] Where G∈G + , since the repulsion loss aims to repel the candidate box from the adjacent real boxes except the specified target, for any candidate box P∈P + , its exclusion target is the real box with the largest IoU except the specified target, that is:
[0094]
[0095] Where, Assume B p is the detection frame regressed from the candidate frame P, then B p and The overlapping IoGs are expressed as follows:
[0096]
[0097] Therefore, the rejection loss can be calculated by the following formula:
[0098]
[0099] In the above technical solution, in order to further improve the detection accuracy of the model, the present invention introduces the exclusion loss into the loss function. The exclusion loss aims to repel the candidate box from the adjacent real boxes other than the specified target, suppress the interference of the adjacent candidate box on the real target box, and better obtain the accurate position of the target.
[0100] In this example, the dataset was divided into a training set, a validation set, and a test set with a ratio of 8:1:1. The number of training rounds was set to 100, and the batch size of each training input was 16 images. The training process was monitored via the Tensor Board, and the trained weights were saved after the training was completed. The effects achieved by this invention are described below with reference to the accompanying figures.
[0101] In order to demonstrate the effect achieved by the invention, the detection diagram of the improved model is compared with the existing model, as shown in Figures 7(a), 7(b) and 8(a), 8(b), with the upper part being the detection diagram of the original model and the lower part being the detection diagram of the improved model. As can be seen from Figure 7(a), in a dark environment, the vehicle target to be detected in the distance in the image is marked with a circular frame. The original model does not detect the vehicle target in the distance, and the existing model misses the detection. As shown in Figure 7(b), the improved model of the present invention accurately identifies the vehicle target hidden in the dark environment in the distance. In addition, it can be seen from Figure 8(a) that the vehicle target hidden in the darker environment in the distance marked with a circular frame is difficult to identify by both the human eye and the existing model. As shown in Figure 8(b), the improved model enhances the characteristics of the vehicle target in the dark and can successfully detect it. It can be seen that the detection performance of the model of the present invention is better than that of the existing model.
[0102] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. It will be apparent to those skilled in the art that various changes, modifications, substitutions, and variations of these embodiments, including components, without departing from the principles and spirit of the present invention are still within the scope of protection of the present invention.
Claims
1. A vehicle target detection based on LLC-YOLO algorithm, characterized in that: The steps include: Step 1: Obtain an image dataset and filter it through a script to obtain images labeled as night. Then, convert the label file from JSON format to YOLO format. Step 2: Build an LLC-YOLO model. The LLC-YOLO model includes LLC-Net, backbone network, neck network CMCF-Neck, and head. The backbone network uses YOLOv5. The CMCF-Neck uses the YOLOv5 neck network as the main network architecture. In the C3 module of the YOLOv5 neck network, CMConv convolution is used instead of ordinary convolution Conv to reconstruct it into the M3 module. The convolution structure of the CMConv takes a feature with c1 input channels, changes the number of channels to c2 / 2 through ordinary convolution, then obtains a feature map of c2 / 2 through depthwise separable convolution, connects the outputs of ordinary convolution and depthwise separable convolution through Concat, and then uses Shuffle operation to match and connect the corresponding channels of ordinary convolution and depthwise separable convolution together to obtain a feature map with c2 output channels; Step 3: Perform low-light enhancement on the selected night images through LLC-Net; The low-light enhancement method comprises the following steps: dividing the input image into feature maps L0, L1, L2, and L3 of different scales using the Laplacian pyramid in LLC-Net; processing potential semantic features using the image enhancement module in LLC-Net on the feature maps Li (i=0, 1, 2, 3) of different scales; and concatenating the output of the image enhancement module with L3 as input and the output of the image enhancement module with L2 as input in a bottom-up manner. This process is then repeated upwards until the image enhancement module with L0 as input finally obtains feature maps containing information of different scales. The image enhancement module includes an adaptive low-pass filter and an edge information extraction module connected by Concat; Step 4: Extract features from the low-light enhanced image through the backbone; Step 5: Perform feature fusion between channels through CMCF-Neck; Step 6: Output the detection results through the head.
2. The vehicle target detection based on LLC-YOLO algorithm according to claim 1, characterized in that: After preprocessing, the dataset was divided into a training set, a validation set, and a test set in a ratio of 8:1:
1.
3. The vehicle target detection based on LLC-YOLO algorithm according to claim 1, characterized in that: The implementation of the adaptive low-pass filter is as follows: In images of different scales, an adaptive low-pass filter is used to capture low-frequency information in each channel, and average pooling of 1*1, 2*2, 3*3, and 6*6 is used for feature filtering, allowing only information below the cutoff frequency to pass. The formula is as follows: Filter(f i )=Up(β s (f i )) where f i Indicates that it is part of the channelsplit output, Up is bilinear interpolation sampling, β s It is the adaptive average pooling of different sizes s×s.
4. The vehicle target detection based on LLC-YOLO algorithm according to claim 1, characterized in that: The edge information extraction module includes an upper and lower branch structure and an edge branch structure. The upper and lower branch structures are defined as: CB(x)=x+γ(F1(x1)) Where x1 = σ(F2(x)).x, x is the input feature, F is the 3*3 convolutional layer, γ is the LeakyReLU, and σ is the Softmax function; The edge branch structure is defined as: EB(x)=F3(Canny h (x)+Canny w (x))+x Among them, x is the input feature, Canny h and Canny w They are edge operations in the vertical and horizontal directions respectively, and F is a 3*3 convolutional layer.
5. The vehicle target detection based on LLC-YOLO algorithm according to claim 1, characterized in that: The CMConv convolution parameter amount: Flops1=whk1.k2.c1 / 2+c2 / 2 Among them, w is the width of the output feature map, h is the height of the output feature map, k1 and k2 are the sizes of the convolution kernels, which are 3*3. c1 is the number of channels of each convolution kernel, which is also the number of channels of the input feature map, and c2 is the number of channels of the output feature map.
6. The vehicle target detection based on LLC-YOLO algorithm according to claim 1, characterized in that: The loss function expression during LLC-YOLO model training is as follows: L=L(x,c,l,g)+γL RepGT Among them, L RepGT is the rejection loss, γ is the weight coefficient, which is used to balance the auxiliary loss, and P + = {P}, represents the set of all candidate boxes whose IoU with the real box is greater than 0.5, G + ={G} represents the set of all ground-truth boxes; The rejection loss can be calculated by the following formula:
7. The vehicle target detection based on LLC-YOLO algorithm according to claim 6, characterized in that: The LLC-YOLO model deployment environment is as follows: cuda11.3, deep learning framework pytorch1.12.1, Intel core i9-13900ks CPU, 128G memory, and NVIDIA GeForce RTX 4090 GPU with 24G video memory. During training, the number of training rounds is set to 100, and the batch size of each training input is 16 images. The training process is observed through tensorboard during the training process. After the training is completed, the trained weights are saved.
Citation Information
Patent Citations
Vehicle-mounted target detection method based on improved YOLOv5
CN115731533A
Lightweight low-light target detection method
CN116401547A