A target construction site vehicle detection method based on self-supervised feature small sample learning
By using a self-supervised feature small sample learning method, combined with self-supervised learning and self-adversarial training strategies, a labeled spliced image set is generated and the Yolo v4 model is trained, which solves the problem of poor detection accuracy of small samples in vehicle inspection at construction sites and achieves a significant improvement in detection accuracy and speed.
Patent Information
- Application Number
- CN202211599127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Construction site vehicle detection methods suffer from poor detection accuracy due to small sample sizes. In particular, deep learning algorithms suffer from low small target detection accuracy and missing manually annotated labels.
A self-supervised feature small sample learning method is adopted to obtain an unlabeled initial image set for cutting and rotation operations. A labeled spliced image set is generated by combining self-supervised learning strategy and self-adversarial training strategy. The Yolo v4 model is used for training to improve the robustness and accuracy of the detection model.
It effectively solves the problem of poor detection accuracy in small samples, realizes the expansion of rich labeled content in the data set, improves the model's pertinence and detection accuracy, improves the average detection accuracy by 12%, increases the detection speed by 7-8fps, and increases the recall rate by 8-9%.
Smart Images

Figure CN115909334B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of construction site management, and in particular to a target construction site vehicle detection method based on self-supervised feature small sample learning. Background Art
[0002] Vehicle detection is one of the applications of computer vision technology. Current research on construction vehicle detection methods can be roughly divided into two categories: traditional image processing and machine learning methods, and deep learning-based methods. Traditional methods often rely on information such as vehicle speed, color, and number for detection. For example, the vision-based virtual detection line method meets the needs of vehicle monitoring on large construction sites. Sensor-based vehicle detection methods are simple to operate and do not require complex programming, but their adaptability to various environments is poor. Combining HOG features with support vector machines (SVMs) offers a new approach for construction vehicle identification: first, the extracted image is preprocessed, and then the target area is extracted based on characteristics such as the shape and color of the construction vehicle. This method effectively narrows the target detection range. Among deep learning algorithms, improved convolutional networks such as R-CNN have been applied to intelligent monitoring for detecting intruding construction vehicles. However, these methods suffer from installation difficulties, severe occlusion, and low efficiency in large-area inspections. Liu Yuan et al. proposed the FCOS algorithm, which combines deep learning features with edge features. This method achieves good tracking results but lacks precision in vehicle classification.
[0003] Currently, the more popular deep learning algorithm is an improvement on the Yolo algorithm. Yolo (You only look once) is a real-time target detection system based on CNN (Convolutional Neural Network) proposed by Joseph Redmon et al. in 2015. It has been widely used in medical, industrial, and production fields.
[0004] In recent years, researchers have been continuously improving the residual network structure and increasing the number of network layers to enhance the detection performance of convolutional networks. For example, the improved Yolo v3 detection algorithm utilizes contextual features for fusion and multi-scale training, which significantly improves detection accuracy.
[0005] Gomez, Patel, and others proposed a method for training computer vision algorithms using freely available multimodal content. They leveraged the idea of self-supervised learning with visual features to mine a large-scale multimodal (text and image) document corpus, leveraging the hidden semantic structure found in text corpora with a topic modeling technique (TextTopicNet) for multimodality. Mehdi, Ananth, and others promoted self-supervised learning through knowledge transfer, proposing a method to reduce pseudo-label transfer knowledge on unlabeled datasets.
[0006] Due to the limitations of practical conditions in life, public data sets of construction vehicles are often small samples, and the accuracy of supervised training based on deep learning is not high enough. The reason is that the types and numbers of samples collected in the data set are small, and the feature extraction process cannot be effectively trained.
[0007] Supervised training, however, can be affected by other factors, resulting in missing or incorrect manual labels, making the labeling process extremely difficult. Due to the complexity of the construction environment, deep learning algorithms still suffer from poor small object detection accuracy. This is primarily due to pixel changes in images after repeated convolution training. As convolution accuracy increases, pixel coefficients can appear, affecting the detection process. Summary of the Invention
[0008] This application provides a target construction site vehicle detection method based on self-supervised feature small sample learning, which can solve the problem of poor detection accuracy of existing construction site vehicle detection methods due to small sample size.
[0009] The technical solution of this application is a target construction site vehicle detection method based on self-supervised feature small sample learning, the method comprising:
[0010] S1: Obtain an unlabeled initial image set of the target construction site, and perform a cutting operation and a rotation operation on the unlabeled initial image set based on a preset rotation angle, thereby obtaining an unlabeled cut image set and an unlabeled rotated image set respectively;
[0011] S2: Confirm the task operation items of the self-supervised learning strategy, and perform iterative cyclic splicing operations on the unlabeled rotated image set based on the task operation items to obtain a labeled spliced image set;
[0012] S3: Based on the self-adversarial training strategy, the labeled spliced image set is reversely rotated to obtain a labeled reverse image set, and the labeled reverse image set is modified based on the unlabeled cut image set to obtain a labeled modified image set;
[0013] S4: Obtain a set of labeled initial images of the target construction site, train a Yolo v4 model using the labeled modified image set and the labeled initial image set, and obtain a vehicle detection model based on the target construction site;
[0014] S5: Obtain a time image set of vehicles at the target construction site, and input the time image set into a vehicle detection model to obtain a detection result corresponding to the time image set.
[0015] Optionally, step S1 includes:
[0016] S11: Acquire an on-site video of the target construction site, and acquire a number of on-site pictures based on the on-site video;
[0017] S12: Grouping a number of on-site pictures into an unlabeled on-site picture set, a self-supervised detection picture set, and a model detection picture set according to a preset cutting ratio;
[0018] S13: Acquire vehicle images from non-target construction sites, combine the unlabeled site image set and the vehicle images into an unlabeled initial image set, and perform a segmentation operation on the unlabeled initial image set based on a preset image size to obtain a plurality of unlabeled segmented images and corresponding unlabeled segmented image sets;
[0019] S14: performing an arbitrary angle rotation operation on the unlabeled cut image to obtain an unlabeled rotated image and a corresponding unlabeled rotated image set classified by the rotation angle;
[0020] And, the step S2 includes:
[0021] S21: confirming task operation items related to the self-supervised learning strategy, wherein the task operation items include: overlapping splicing and adding noise;
[0022] S22: Based on the task operation item, an iterative cyclic splicing operation is performed on the self-supervised detection picture set and the unlabeled rotation picture set to obtain a labeled spliced picture and a corresponding labeled spliced picture set.
[0023] Optionally, step S3 includes:
[0024] S31: rotating the unlabeled cut image at 90°, 180°, and 270° rotation angles respectively to obtain an unlabeled control image and a corresponding unlabeled control image set;
[0025] S32: determining a pixel loss of the marked spliced picture set compared to the unmarked initial picture set, and performing a corresponding reverse rotation operation on the unmarked rotated pictures in the unmarked rotated picture set to obtain marked reverse pictures and a corresponding marked reverse picture set;
[0026] S33: Based on the reference of the unlabeled control picture set, determine the unlabeled cut picture corresponding to the labeled reverse picture in the unlabeled cut picture set, and modify the pixel information of the corresponding labeled reverse picture according to the pixel information of the unlabeled cut picture to obtain the labeled modified picture and the corresponding labeled modified picture set.
[0027] Optionally, step S4 includes:
[0028] S41: Obtain a labeled initial image set of the target construction site, train a Yolo v4 model using the labeled modified image set and the labeled initial image set, and obtain a vehicle detection model based on the target construction site;
[0029] S42: Input the model detection image set to the vehicle detection model to obtain the test detection result;
[0030] S43: The test result is judged according to a preset threshold value to obtain a judgment result. If the judgment result does not meet the expected standard, step S14 and steps S2 to S4 are repeated.
[0031] Beneficial effects:
[0032] By setting up a self-supervised learning strategy, this application can effectively expand the sample size of small samples and obtain a labeled spliced image set with rich labeled content. This effectively solves the problem of existing construction site vehicle detection models relying on large samples. Moreover, because the small samples are generated based on actual construction sites, the trained model is more targeted.
[0033] Secondly, this application also provides a self-adversarial training strategy for pixel correction of the labeled spliced image set, ensuring the accuracy of model training.
[0034] In summary, this method can solve the problem of poor detection accuracy of existing construction site vehicle detection methods due to small sample sizes, and can achieve 3-4 times data enhancement while ensuring the sample image pixels of the dataset, thereby improving the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0036] Figure 1 Schematic diagram of a flow chart of a target construction site vehicle detection method based on self-supervised feature small sample learning in an embodiment of the present application;
[0037] Figure 2 A schematic diagram comparing the processes of supervised learning and self-supervised learning in the embodiments of the present application;
[0038] Figure 3 This is a diagram of the ResNet-50 network training structure in an embodiment of the present application;
[0039] Figure 4 This is a diagram of the Yolo v4 network training structure in the embodiment of this application;
[0040] Figure 5 Schematic diagram comparing detection accuracy and recall rate obtained by different detection methods based on different detection data sets in the embodiments of the present application;
[0041] Figure 6 This is a schematic diagram comparing the detection results obtained by different detection methods based on the same detection data set in the embodiments of the present application. DETAILED DESCRIPTION
[0042] The following embodiments are described in detail, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numbers in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following embodiments are not intended to represent all possible implementations consistent with the present application. They are merely examples of systems and methods consistent with certain aspects of the present application, as detailed in the claims.
[0043] The embodiment of the present application proposes the SSL-Yolo v4 algorithm to improve the original data enhancement method of Yolo v4 into contrast enhancement, so as to improve the recognition, positioning and detection accuracy of the network.
[0044] Specifically, due to the complex environment of construction sites, the variety of construction vehicles, and the significant impact of environmental changes, the application of smart transportation on construction sites is extremely difficult. To address the above issues, a SSL-Yolo v4 (Self Supervised Learning-Yolo v4) detection algorithm is proposed. By combining and improving the self-supervised learning network with the Yolo v4 algorithm network, a self-supervised learning method based on context rotation is introduced to solve the problem of requiring a large amount of manually labeled data in the training of existing deep learning algorithms. Secondly, the trained self-supervised learning network is combined with the Yolo v4 network to improve the prediction ability, model robustness, and detection accuracy. Comparative experiments were conducted on a self-built dataset to verify the performance of the proposed algorithm. The average detection accuracy was improved by 12%, the detection speed was increased by 7-8fps, and the recall rate was increased by 8-9%. The results show that the proposed method has high performance.
[0045] Example 1
[0046] like Figure 1 As shown, Figure 1 This is a flow chart of a target construction site vehicle detection method based on self-supervised feature small sample learning in an embodiment of the present application, including:
[0047] S1: Obtain an unlabeled initial picture set about the target construction site, and perform a cutting operation and a rotation operation on the unlabeled initial picture set based on a preset rotation angle, thereby obtaining an unlabeled cut picture set and an unlabeled rotated picture set accordingly.
[0048] Specifically, in the past, during the dataset construction process, most people chose public datasets. However, due to the complexity of the construction vehicle on-site environment, there are very few public datasets. In terms of data collection, in order to ensure the authenticity of the data, we contacted the construction site and collected a variety of construction vehicles, including cranes, excavators, etc., around the power transmission lines under different backgrounds such as trees and houses. The obtained car dataset was input into the network model for training, and data enhancement was achieved through operations such as random rotation and denoising. In order to improve the accuracy of the detector, the dataset used in this application was independently produced in the MATLAB environment.
[0049] Wherein, step S1 includes:
[0050] S11: Acquire an on-site video of the target construction site, and acquire several on-site pictures based on the on-site video.
[0051] S12: Grouping a number of on-site pictures into an unlabeled on-site picture set, a self-supervised detection picture set, and a model detection picture set according to a preset cutting ratio.
[0052] Specifically, for the collected live videos, we use VideoLaber to split them into frames, and get 400 original images, which are distributed in a ratio of 6:3:1, 60% for the random rotation dataset, 30% for the self-supervised detection dataset, and 10% for the detection set.
[0053] S13: Obtain vehicle images from non-target construction sites, combine the unlabeled site image set and the vehicle images into an unlabeled initial image set, and perform a cutting operation on the unlabeled initial image set based on a preset image size to obtain a plurality of unlabeled cut images and corresponding unlabeled cut image sets.
[0054] S14: performing a rotation operation on the unlabeled cut image at any angle to obtain an unlabeled rotated image and a corresponding unlabeled rotated image set using the rotation angle as a classification standard.
[0055] Specifically, a random rotation operation of 0° to 180° is performed on the unlabeled cut images, and the random rotation operation can increase the diversity of samples.
[0056] Generate several images randomly with different position types and save them as JPG images with transparency information.
[0057] X1=x*cosθ+y*sinθ;
[0058] Y1=x*sinθ+y*cosθ;
[0059] Where x, y are the coordinates of the unlabeled cut image minus the center point of the unlabeled cut image, X1 and Y1 are the coordinates of the unlabeled rotated image minus the center point of the unlabeled rotated image, and θ is the rotation angle.
[0060] The actual coordinates after rotation are the original coordinates of the unmarked cut image plus the coordinates of the center point of the unmarked rotated image after rotation.
[0061] H(x, y) = T[B(x, y)];
[0062] Where T is the random deformation operation in the above process, B(x, y) is the image captured from the video, and H(x, y) is the image obtained after the deformation operation.
[0063] f(x, y) i =B(x, y)+H i (x, y, θ);
[0064] Where f(x, y) i is the new data set, B(x, y) is the original data set, and H is the deformed data set.
[0065] S2: Confirm the task operation items of the self-supervised learning strategy, and perform iterative cyclic splicing operations on the unlabeled rotated image set based on the task operation items to obtain a labeled spliced image set.
[0066] Specifically, supervised learning requires extensive manual effort in the manual annotation and label generation process, while deep learning training requires a vast number of data samples. Labeling large numbers of samples remains a bottleneck for supervised learning, as the amount of training data is crucial in data-driven models. To reduce the burden of data collection, unsupervised or semi-supervised learning strategies can be employed.
[0067] Unsupervised learning refers to training that does not require human intervention and operation. Self-supervised learning is a type of unsupervised learning.
[0068] like Figure 2 As shown, Figure 2 This is a schematic diagram comparing the supervised learning and self-supervised learning processes in the examples of this application. In self-supervised learning, auxiliary supervision tasks are set based on certain attributes of the input data to achieve training objectives, without the need for manual data labeling. For example, this includes segmenting an image into squares of different sizes, reconstructing the image, extracting key features, and predicting image locations.
[0069] Wherein, step S2 includes:
[0070] S21: Confirm the task operation items for the self-supervised learning strategy, which include overlapping splicing and adding noise.
[0071] S22: Based on the task operation item, an iterative cyclic splicing operation is performed on the self-supervised detection picture set and the unlabeled rotation picture set to obtain a labeled spliced picture and a corresponding labeled spliced picture set.
[0072] Specifically, the context-based self-supervised learning strategy can include several task items, such as image puzzle, repair, coloring, rotation and other operations. This application mainly studies the method of image rotation.
[0073] S3: Based on the self-adversarial training strategy, the labeled spliced picture set is reversely rotated to obtain a labeled reverse picture set, and the labeled reverse picture set is modified based on the unlabeled cut picture set to obtain a labeled modified picture set.
[0074] Specifically, during image rotation, coordinates are transformed from integers to decimals. The new coordinates are rounded off, and some coordinates are lost during this process, leading to noise. The solution is to use reverse thinking, rotating the unlabeled image backward to the unlabeled cut image for pixel search.
[0075] Linear interpolation is performed on the reverse-rotated labeled image set to ensure that the pixels of the final output labeled modified image are correct, thereby improving the image quality.
[0076] During the operation, an untrained ResNet50 network is used as a self-adversarial training network, and 4 rotation angles are output. In the embodiment of the present application, the number of nodes of the ResNet50 network is changed to 4, and 4 different classifications are predicted.
[0077] The labeled spliced image set is input into the ResNet-50 network. The ResNet-50 network uses a deep convolutional network and has a normalization operation after each convolution and before activation, which improves the ability of feature extraction. Figure 3 As shown, Figure 3 This is the ResNet-50 network training structure diagram in the embodiment of the present application. In the deep convolution residual block, by setting the convolution-related parameters, the input and output feature map sizes of the residual block can be controlled to be consistent, so as to perform addition processing and avoid the gradient disappearance problem of the deep network.
[0078] Wherein, step S3 includes:
[0079] S31: performing a rotation operation on the unlabeled cut image at rotation angles of 90°, 180°, and 270°, respectively, to obtain an unlabeled control image and a corresponding unlabeled control image set.
[0080] S32: Determine the pixel loss of the marked spliced picture set compared to the unmarked initial picture set, and perform corresponding reverse rotation operations on the unmarked rotated pictures in the unmarked rotated picture set to obtain marked reverse pictures and a corresponding marked reverse picture set.
[0081] S33: Based on the reference of the unlabeled control picture set, determine the unlabeled cut picture corresponding to the labeled reverse picture in the unlabeled cut picture set, and modify the pixel information of the corresponding labeled reverse picture according to the pixel information of the unlabeled cut picture to obtain the labeled modified picture and the corresponding labeled modified picture set.
[0082] Specifically, the rotated image is used as input, and the predicted image rotation angle is output. The unlabeled cropped images are rotated 90°, 180°, and 270°, respectively, and then spliced together to obtain an unlabeled control image set. This unlabeled control image set and the labeled reverse image set are input into the network training front-end, thus avoiding the problem of ambiguity in the rotation angle of the input image.
[0083] S4: Obtain a labeled initial image set of the target construction site, train the Yolo v4 model by labeling the modified image set and the labeled initial image set, and obtain a vehicle detection model based on the target construction site.
[0084] Specifically, if Figure 4 As shown, Figure 4 This is the Yolo v4 network training structure diagram in the embodiment of this application. The CNN neural network part is a self-adversarial training network (SAT network). The CNN neural network calculates the process loss and then backpropagates it to the image to modify the image information. This operation does not require changing the network weights, and the modified image is directly input into the training network. When there are many objects in the image, the accuracy of the model needs to be improved. However, the self-supervised model only achieves local optimization during the training process and fails to achieve global optimization.
[0085] To solve this problem, the embodiment of the present application combines self-supervised learning with the Yolo v4 network front-end, improves the data enhancement algorithm of the Yolo v4 network, and then uses the self-adversarial network to backpropagate information to modify the original image.
[0086] The original Yolo v4 algorithm used Mosaic data augmentation, which uses the cutmix method to combine four images into a single training image. Cutmix randomly crops images of different shapes and sizes, replacing them with images of the same size but different types to predict the probability of different target types. This method improves positioning capabilities and training efficiency, but forced stitching of images with similar backgrounds that are not in the target area can lead to cluttered backgrounds and increase detection difficulty.
[0087] To address this issue, this embodiment removes Mosaic data augmentation and proposes a combined cutout and mixup method based on self-supervision. The self-supervised folders, categorized by rotation angle, are then overlapped and spliced to create four different overlapping images. After adding noise to the images, these images are then fed into a self-adversarial training network in the Yolo v4 network frontend. The enhanced results are then used for training to improve the robustness of the model.
[0088] The embodiments of the present application use MATLAB to complete comparative training and research on various advanced target detection networks. In view of the complexity of the construction site, the similarity between construction vehicles, occlusion problems, multi-scale changes and other complex engineering problems, a detection network with both detection speed and accuracy suitable for the construction site is determined.
[0089] By collecting actual videos of the construction site, the labeled spliced image set generated after self-supervised learning is input into the data augmentation network. The images first undergo the noise addition cutout operation and the random image overlap mixup operation, and then are sent to the SSL-Yolo v4 network front-end self-adversarial network.
[0090] (1) Preprocessing the enhanced images to prepare for pre-training: Adjust the image size, scale the pixel range, and batch process the input images.
[0091] (2) When the input image size is inconsistent with the specified network output image size, the input frame and anchor box are adjusted according to the feature extraction network input size, and the input dataset size is adjusted to a size suitable for the feature extraction network.
[0092] (3) Next, reset the parameters of the SSL-Yolo v4 network, set the number of anchor boxes to 8, and pass the anchor boxes data to the configureyolo v4 function for correct network arrangement. The configureyolo v4 function can improve the network's operating speed.
[0093] (4) Create a Yolo v4 target detection network and set the network training parameters. The Yolo v4 network training optimization method uses stochastic gradient descent momentum (SGDM). The initial learning rate is 0.001. Yolo v4 is divided into 16 subsets and the maximum number of training times is 100.
[0094] Use the predicted anchor boxes to estimate anchor boxes based on the size of objects in the training data. Considering that images are resized before training, the training data used to estimate anchor boxes also needs to be resized. Set 'CheckpointPath' to a temporary location. This allows you to save partially trained detectors during training. If training is interrupted due to a power outage or system failure, you can resume training from the saved checkpoint.
[0095] To perform detection, first download a pre-trained network, set it as the main network, and perform object detection using the Yolov4 network. Then, read a test image. Then, set anchor boxes and introduce object categories. Then, detect the target image and visualize the detection results, including the target location, size category, and detection accuracy.
[0096] The Yolo v4 algorithm requires a fixed output image size. If the input image size is larger or smaller than the specified output image size, the input image will be compressed or stretched, which can cause image distortion. Small objects in the image are prone to blurring or even loss.
[0097] Wherein, step S4 includes:
[0098] S41: Obtain a labeled initial picture set of the target construction site, train a Yolo v4 model by labeling the modified picture set and the labeled initial picture set, and obtain a vehicle detection model based on the target construction site.
[0099] S42: Input the model detection image set to the vehicle detection model to obtain the test detection results.
[0100] S43: The test result is judged according to a preset threshold value to obtain a judgment result. If the judgment result does not meet the expected standard, step S14 and steps S2 to S4 are repeated.
[0101] S5: Obtain a time image set of vehicles at the target construction site, and input the time image set into a vehicle detection model to obtain a detection result corresponding to the time image set.
[0102] Simulation analysis
[0103] In order to accurately evaluate the detection performance of the SSL-Yolo v4 algorithm proposed in this paper, this paper selects the commonly used evaluation indicators of detection accuracy (Average Precision), detection speed (Detection speed), and regression rate (Recall). The number of correct detections is abbreviated as TP, the number of false positives is abbreviated as FP, and the number of false negatives is abbreviated as FN. The intersection over union (IOU) is a standard for measuring the accuracy of detecting corresponding objects in a specific data set. In fact, there are multiple bounding boxes to be predicted together, and then the network will select the bounding box with the best prediction (that is, the one with the largest IOU) online for prediction. The intersection over union (IOU) is equivalent to the result obtained by dividing the overlapping part of two areas by the collective part of the two areas.
[0104]
[0105]
[0106]
[0107] To validate the effectiveness of context-based self-supervised learning model classification, we selected three public datasets: VOT-50, VOT-100, and CIFAR-10. VOT-50 and VOT-100 are standard video sequence datasets that contain scale variations, while images in the CIFAR-10 dataset contain a variety of objects. Training data was selected from the original dataset using different proportions: 20%, 40%, and 60% of the dataset, respectively. Self-supervision represents models trained using self-supervised learning methods, while supervised represents models trained using manually labeled data.
[0108] Table 1 shows the data from models trained using different learning methods. As shown in Table 1, as the sample size increases, the classification accuracy of models trained using manually labeled data decreases significantly, while the performance of models trained using self-supervision decreases slightly. Three groups were randomly selected, with 20%, 40%, and 60% of the dataset size used for experimental analysis. Note that the models were trained using labeled data, and SSL represents models trained using self-supervised networks.
[0109] Table 1 Model classification accuracy based on different sample ratios in public datasets
[0110]
[0111] Table 2 Comparison of IOU-detection speed under different numbers of detection images
[0112]
[0113] As shown in Table 2, Table 2 is a comparative data table of IOU-detection speed under different numbers of detection pictures, which is used to represent the comparative data table of supervised detection, Yolo v4 algorithm detection and the SSL-Yolo v4 algorithm proposed in this paper. The three algorithms have IOU and detection speed under different data sets and different numbers of pictures (including 50, 100, 150, 200, 250, and 300 detection pictures). It can be clearly seen that the algorithm in this paper has a higher detection speed than the Yolo v4 algorithm, while the accuracy of IOU has not dropped significantly. Figure 5 As shown, Figure 5 This figure compares the detection accuracy and recall rates achieved by different detection methods based on different detection datasets in the examples of this application. As the number of images tested increases, both detection speed and recall rate increase accordingly. While supervised learning results show a decrease in detection accuracy compared to self-supervised learning, the proposed SSL-Yolo v4 algorithm achieves higher detection accuracy and recall rates, as well as faster detection speed.
[0114] In the same dataset, different training and detection methods were used to obtain different results. Figure 6 As shown, Figure 6 This is a schematic diagram comparing the detection results obtained by different detection methods in the embodiments of this application based on the same detection data set. Figure 6 (a) is the supervised detection result, Figure 6 (b) is the detection result after introducing self-supervised learning in Yolo v4 network. Figure 6 (c) Detection results after improving Yolo v4 data augmentation and introducing self-supervised learning. Based on the detection accuracy under different conditions, it is clearly seen that the detection box of the detected object in (a) is severely lost. It is clearly seen that the detection box of the detected object in (a) is severely lost. While (b) with self-supervised learning can detect small objects, it is not fully detected due to the face being obscured by the helmet worn by the person in the image. Figure (c) shows the detection results after improving the data augmentation method. By introducing contrast enhancement for different targets, it is clear that the detection coverage and detection accuracy have been significantly improved. Next, different external conditions are simulated. It is clear that when the vehicle features are not obvious, the proposed algorithm can more accurately mark the vehicle location. This comparison also shows that the proposed SSL-Yolo v4 algorithm has higher detection accuracy when the camera is overhead and obstructed, and detects more types of objects with greater accuracy.
[0115] The above detailed description of the embodiments of the present application is only for the preferred embodiments of the present application and should not be considered as limiting the scope of implementation of the present application. All equivalent changes and improvements made within the scope of the present application should still fall within the scope of the patent application.
Claims
1. A target construction site vehicle detection method based on self-supervised feature small sample learning, characterized by: The method comprises: S1: Obtain an unlabeled initial image set of the target construction site, and perform a cutting operation and a rotation operation on the unlabeled initial image set based on a preset rotation angle, thereby obtaining an unlabeled cut image set and an unlabeled rotated image set respectively; S2: Confirm the task operation items of the self-supervised learning strategy, and perform iterative cyclic splicing operations on the unlabeled rotated image set based on the task operation items to obtain a labeled spliced image set; S3: Based on the self-adversarial training strategy, the labeled spliced image set is reversely rotated to obtain a labeled reverse image set, and the labeled reverse image set is modified based on the unlabeled cut image set to obtain a labeled modified image set; S4: Obtain a set of labeled initial images of the target construction site, train a Yolo v4 model using the labeled modified image set and the labeled initial image set, and obtain a vehicle detection model based on the target construction site; S5: Obtain a time image set of vehicles at the target construction site, and input the time image set into a vehicle detection model to obtain a detection result corresponding to the time image set; The step S2 comprises: S21: confirming task operation items related to the self-supervised learning strategy, wherein the task operation items include: overlapping splicing and adding noise; S22: performing an iterative cyclic splicing operation on the self-supervised detection image set and the unlabeled rotation image set based on the task operation item to obtain a labeled spliced image and a corresponding labeled spliced image set; The step S3 comprises: S31: rotating the unlabeled cut image at 90°, 180°, and 270° respectively to obtain an unlabeled control image and a corresponding unlabeled control image set; S32: determining a pixel loss of the marked spliced picture set compared to the unmarked initial picture set, and performing a corresponding reverse rotation operation on the unmarked rotated pictures in the unmarked rotated picture set to obtain marked reverse pictures and a corresponding marked reverse picture set; S33: Based on the reference of the unlabeled control picture set, determine the unlabeled cut picture corresponding to the labeled reverse picture in the unlabeled cut picture set, and modify the pixel information of the corresponding labeled reverse picture according to the pixel information of the unlabeled cut picture to obtain the labeled modified picture and the corresponding labeled modified picture set.
2. The method for detecting vehicles at a target construction site based on self-supervised feature small sample learning according to claim 1, wherein step S1 comprises: S11: Acquire an on-site video of the target construction site, and acquire a number of on-site pictures based on the on-site video; S12: Grouping a number of on-site pictures into an unlabeled on-site picture set, a self-supervised detection picture set, and a model detection picture set according to a preset cutting ratio; S13: Acquire vehicle images from non-target construction sites, combine the unlabeled site image set and the vehicle images into an unlabeled initial image set, and perform a segmentation operation on the unlabeled initial image set based on a preset image size to obtain a plurality of unlabeled segmented images and corresponding unlabeled segmented image sets; S14: performing a rotation operation on the unlabeled cut image at any angle to obtain an unlabeled rotated image and a corresponding unlabeled rotated image set using the rotation angle as a classification standard.
3. The method for detecting vehicles at a target construction site based on self-supervised feature small sample learning according to claim 2, wherein step S4 comprises: S41: Obtain a labeled initial image set of the target construction site, train a Yolo v4 model using the labeled modified image set and the labeled initial image set, and obtain a vehicle detection model based on the target construction site; S42: Input the model detection image set to the vehicle detection model to obtain the test detection result; S43: The test result is judged according to a preset threshold value to obtain a judgment result. If the judgment result does not meet the expected standard, step S14 and steps S2 to S4 are repeated.
Citation Information
Patent Citations
Remote-sensing image rotating target detection method
CN111783523A
Bird visual target detection method combining YOLO and rotation-fusion strategy
CN112560675A