A method and system for online data enhancement at the input end of a deep neural network for real-time vehicle detection

Through the online data enhancement method, the input data of the vehicle detection algorithm is processed and new image samples are generated, which solves the problem of insufficient accuracy and robustness of traditional vehicle detection algorithms in highway scenarios, and significantly improves the accuracy of vehicle detection. and recognition capabilities.

CN114973161BActive Publication Date: 2024-11-05SHANDONG HI SPEED CONSTRUCTION MANAGEMENT GROUP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210623973.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2024-11-05
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

Traditional vehicle detection algorithms are difficult to achieve accuracy and robustness in highway scenarios, especially due to objective interference factors such as lighting and deformation, and insufficient training samples in the semi-supervised mode lead to insufficient overfitting and generalization capabilities of the identification system.

Method used

Using the vehicle real-time detection of the deep neural network input online data enhancement method, a new image sample is generated and the image is performed by random and non-repetitive HSV transformation, translation, miscut/non-vertical projection, perspective transformation and other operations. Segment, splicing, and correction, randomly adding noise, and finally forming enhanced image samples to augment the training dataset.

Benefits of technology

The ability of the target recognition algorithm to identify overlapping targets of highway vehicles is improved, the recognition accuracy and robustness is improved, the impact of input images at different resolutions on the algorithm recognition performance, and the accuracy and efficiency of vehicle detection are significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114973161B_ABST
    Figure CN114973161B_ABST
Patent Text Reader

Abstract

The present invention relates to an online data enhancement method for the input end of a deep neural network for real-time vehicle detection, comprising step S1: obtaining a highway vehicle data set and image samples; step S2: performing random and non-repetitive operations of maintaining the original state, HSV transformation, translation, shearing / non-vertical projection and perspective transformation on the image samples to obtain new image samples; specifically comprising: performing random and non-repetitive operations of maintaining the original state on 1 / 5 of the image samples to serve as new image samples; performing random and non-repetitive HSV transformation operations on 1 / 4 of the remaining image samples to serve as new image samples; performing random and non-repetitive translation operations on 1 / 3 of the remaining image samples to serve as new image samples; performing random and non-repetitive shearing / non-vertical projection operations on 1 / 2 of the remaining image samples to serve as new image samples; performing random and non-repetitive perspective transformation operations on the remaining image samples to serve as new image samples; the present invention performs data enhancement on images in a training data set, and strengthens the recognition capability of a target recognition algorithm for overlapping targets of highway vehicles without changing a network structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method and system for online data enhancement at the input end of a deep neural network for real-time vehicle detection. Background Art

[0002] With the optimization of highway structure and grade, the connection between regions has become closer, which has promoted social and economic development. At the same time, with the development of new generation technologies, the pilot construction of information-based and data-based smart highways has begun, with full coverage of the monitoring range, the abolition of provincial boundary toll stations, and the deployment of ETC electronic non-stop toll gates. The process of intelligent and digital transformation of basic roadside facilities has been continuously extended, and the comprehensive management of the road network combined with big data. On the one hand, smart highways improve the level of highway safety and vehicle traffic efficiency, and on the other hand, they build an efficient information communication system, connect cloud platforms and big data centers, realize vehicle-road collaboration, and coordinate the overall intelligent and efficient management. Although the construction of highway networks is becoming more and more large-scale, structured, and intelligent, and the comprehensive management technology of vehicles and roads is becoming more and more perfect, in the early stage of the application of these new technologies, the challenge of vehicle detection needs to be solved. Vehicle target detection in highway scenarios is a key technology in intelligent traffic management and safety monitoring, and is the basis for realizing intelligent and diversified traffic management, and has important research value. The vehicle detection problem is to detect vehicle targets from the inspected area, accurately classify vehicle types, and accurately locate vehicle positions. For the problem of identifying occluded targets, target detection has always been a research hotspot in the field of computer vision. Vehicle detection is the most basic and most difficult task in the field of target detection because of the different appearance attributes and states of various vehicles during the detection process, as well as the interference of objective factors.

[0003] The traditional vehicle detection algorithm has a relatively simple method of extracting features. It relies on manual extraction. After extracting moving vehicles from video sequences, the extracted features are classified by classifiers to achieve the purpose of vehicle recognition. However, the traditional method of selecting features relies too much on prior knowledge. In actual application scenarios, there are many objective interference factors, such as illumination and deformation. Therefore, it is difficult for traditional vehicle detection algorithms to be applied to real scenarios and it is difficult to achieve the accuracy and robustness required for practical applications. Based on the Convolutional Neural Network (CNN), many target detection algorithms have been gradually developed. According to the network structure, they are mainly divided into two categories: One-Stage structure and Two-Stage structure. In recent years, a semi-supervised mode based on the combination of unsupervised mode and supervised mode has gradually developed. In this mode, the fault identification system uses a small number of known samples to complete the initial training, and then further trains the system through self-learning in the process of identifying unknown samples, and finally completes the classification of a large number of unlabeled samples. The semi-supervised mode saves the cost of collecting labeled samples, but due to the small number of training samples, the identification system has serious overfitting problems, insufficient generalization ability, and poor overall identification results. To this end, a semi-supervised model based on data enhancement has been proposed. Through some data enhancement algorithms or methods, a large number of pseudo known samples are generated based on known samples to expand the capacity of training samples and enhance the generalization ability of the recognition system. The data enhancement algorithm downsamples the original data and then constructs new data through data interpolation. Therefore, data enhancement algorithms generally require complex algorithm support to retain the characteristics of the constructed new data as much as possible without being exactly the same as the original data. Therefore, for highway vehicle detection and recognition, small targets and vehicle occlusion problems, access to high-quality data is still an obstacle, and a new real-time vehicle detection method is urgently needed. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a method and system for online data enhancement at the input end of a deep neural network for real-time vehicle detection to solve the problems raised in the above-mentioned background technology.

[0005] Terminology explanation:

[0006] 1. batch_size: indicates the number of parameters passed to the program for training at a time.

[0007] 2. batch: indicates the number of batches, where the number of batches = number of samples / batch_size.

[0008] 3. HSV transformation: HSV (Hue, Saturation, Value) is a color space created by AR Smith in 1978 based on the intuitive characteristics of color, also known as the hexcone model.

[0009] 4. Translation: refers to moving all points on a figure the same distance in a straight line direction within the same plane. This kind of figure movement is called translational movement of the figure, or simply translation.

[0010] 5. Shearing: A plane figure obtained by scaling the signed distance from each point of the figure to a straight line parallel to the direction in a certain direction according to a certain ratio.

[0011] 6. Non-vertical projection: a geometric projection method.

[0012] Perspective transformation: Perspective transformation refers to the transformation that uses the condition that the perspective center, image point and target point are collinear, and according to the law of perspective rotation, the image receiving surface (perspective surface) is rotated by a certain angle around the trace line (perspective axis), thereby destroying the original projection light beam, while still keeping the projected geometric figure on the image receiving surface unchanged.

[0013] The technical solution of the present invention is:

[0014] A method for online data enhancement at the input end of a deep neural network for real-time vehicle detection, comprising:

[0015] Step S1: Obtain highway vehicle dataset and image samples;

[0016] Step S2: performing random and non-repetitive operations of maintaining the original state, HSV transformation, translation, shearing / non-vertical projection and perspective transformation on the image sample to obtain a new image sample;

[0017] Specifically, it includes: performing random and non-repetitive operations on 1 / 5 of the image samples while keeping them unchanged as new image samples;

[0018] Perform random and non-repetitive HSV transformation operations on 1 / 4 of the remaining image samples as new image samples;

[0019] Perform a random and non-repetitive translation operation on 1 / 3 of the remaining image samples as new image samples;

[0020] Perform random and non-repetitive shearing / non-vertical projection operations on 1 / 2 of the remaining image samples as new image samples;

[0021] Perform a random and non-repetitive perspective transformation operation on the remaining image samples as new image samples;

[0022] Step S3: randomly select a number of pictures from the new image sample, perform image segmentation by random scaling, and then form a new sample by splicing and image correction by random distribution;

[0023] Step S4: Perform operations of flipping up and down, flipping left and right, and keeping the new sample as it is in accordance with uniform distribution, and randomly add Gaussian noise to finally obtain an enhanced image.

[0024] Furthermore, the step S1 acquires a highway vehicle data set and image samples, including collecting image samples of different angles, different road sections, and different lighting conditions in the highway monitoring video.

[0025] Furthermore, the random and non-repetitive HSV transformation operation on the image samples includes normalizing the pixel values ​​in the image samples, obtaining the maximum and minimum values ​​of the pixel values ​​and their differences, and calculating the HSV values ​​in the color space respectively.

[0026] Furthermore, the random and non-repetitive translation operation on the image sample specifically includes: assuming that the data coordinates of the selected single image sample are (x, y), then

[0027]

[0028]

[0029] Where M T is the translation matrix, M 11 、M 12 ,...M 33 is the translation matrix parameter, where M 11 、M 22 、M 33 It is a fixed value of 1; src(x,y) represents the selected single image sample, and dst(x,y) represents the translated image.

[0030] Furthermore, the random and non-repetitive shearing / non-vertical projection of the image sample specifically includes: assuming that the data coordinates of the selected single image sample are (x, y), then

[0031]

[0032]

[0033] Where M S is the shear / non-perpendicular projection matrix, M 11 、M 12 ,...M 33 is the shear / non-vertical projection matrix parameter, where M11 、M 22 、M 33 It is a fixed value of 1; src(x,y) represents a single selected image sample, and dst(x,y) represents the image after shearing / non-vertical projection transformation.

[0034] Furthermore, the random and non-repetitive perspective transformation operation on the image sample specifically includes: assuming that the data coordinates of the selected single image sample are (x, y), then

[0035]

[0036]

[0037] Where M P is the perspective transformation matrix, src(x,y) represents the selected single image sample, and dst(x,y) represents the image after the perspective transformation.

[0038] Furthermore, the image correction includes removing the detection frame of the stitched image that is not in the area where the corresponding image is located, and replacing the detection frame lines that cross the boundary with the area boundary line of the image while partially within the image area and partially outside the image area.

[0039] An online data enhancement system for the input end of a deep neural network for real-time vehicle detection, comprising:

[0040] The data acquisition module is configured to acquire a highway vehicle dataset and image samples;

[0041] The image processing module is configured to obtain new image samples by randomly and non-repeatedly maintaining the original sample, HSV transformation, translation, shearing / non-vertical projection, and perspective transformation operations; randomly use several pictures in the transformed image, perform image segmentation through random scaling, and then form new samples after splicing and image correction through random distribution; perform upside-down flipping, left-right flipping, and maintaining the original state operations on the new sample in accordance with uniform distribution, and randomly add Gaussian noise to obtain an enhanced image.

[0042] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device. The method for online data enhancement at the input end of a deep neural network for real-time vehicle detection is disclosed.

[0043] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded and executed by the processor. The method for online data enhancement at the input end of a deep neural network for real-time vehicle detection is described.

[0044] The beneficial effects of the present invention are:

[0045] 1. The present invention performs data enhancement on the images in the training data set, and strengthens the recognition ability of the target recognition algorithm for overlapping targets of highway vehicles without changing the network structure.

[0046] 2. For small camera platforms in offline state, select appropriate lightweight algorithms to improve recognition accuracy while maintaining its recognition speed and reduce the impact of input images of different resolutions on algorithm recognition performance.

[0047] 3. Through real-time detection tests in different highway scenarios of vehicle datasets, the results show that the algorithm trained with the improved data enhancement method has a higher accuracy in detecting overlapping vehicle targets, proving the effectiveness and robustness of the improved method. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0049] Figure 1 Schematic diagram of the process of the online data enhancement method of the present invention;

[0050] Figure 2 This is a schematic diagram of mosaic data enhancement of the present invention;

[0051] Figure 3 Enhanced mosaic schematic diagram for the present invention;

[0052] Figure 4 A statistical diagram of the number of sample label categories;

[0053] Figure 5 The PR curve of the deep learning network enhanced by data of the present invention;

[0054] Figure 6 This is a schematic diagram of the recognition accuracy of the deep learning network before data enhancement of the present invention;

[0055] Figure 7 This is a schematic diagram of the recognition accuracy of the deep learning network after data enhancement in the present invention. DETAILED DESCRIPTION

[0056] The present invention will be further defined below in conjunction with the accompanying drawings and embodiments, but is not limited thereto.

[0057] Example 1

[0058] like Figure 1As shown, a method for online data enhancement at the input end of a deep neural network for real-time vehicle detection specifically includes the following steps:

[0059] S1, define the highway vehicle dataset, set the number of samples and initialize batch_size;

[0060] S2, get the batch size;

[0061] S3, each batch is arranged according to the reading method of the file path;

[0062] S4, disrupt the order of the batch;

[0063] S5, randomly performing HSV transformation, translation, shearing / non-vertical projection, and perspective transformation operations on the data in the batch of step S4;

[0064] S6. Randomly use the four images in step S5, randomly scale them, and then randomly distribute them for stitching.

[0065] S7, performing operations of flipping the new sample upside down, flipping it left to right, and keeping it as it is in accordance with uniform distribution, and randomly adding noise;

[0066] S8: Check whether the samples in the batch have been read. If so, the process ends. Otherwise, return to step S6.

[0067] The specific method of defining the highway vehicle dataset, setting the number of samples and initializing batch_size in step S1 is as follows:

[0068] According to the highway scene, the characteristics of highway monitoring application angle, resolution, etc. are analyzed. Multi-angle monitoring videos of a certain point of the Dongying to Jinan section of Shandong Dongying Expressway and the Yiyuan Tunnel Expressway of Shandong Zibo Expressway are collected. To ensure the diversity of vehicle samples in the image, the original video data is processed by extracting one image sample every 40 frames, such as Figure 2 As shown in the figure, a total of 1493 images with vehicle information were selected, and 1060 multi-type vehicle images were selected through high-definition surveillance videos of different angles, different road sections, and different lighting conditions to create a detection network training data set to form the original vehicle detection image sample library. The highway vehicle data set is represented by dataset, data_size represents the number of samples, and batch_size is the number of parameters passed to the program for training at a time.

[0069] The method for obtaining the batch size in step S2 is: according to the number of data_size samples in step S1 and the number of parameters batch_size passed to the program for training at one time,

[0070] The specific method of step S3 is: through the built-in data reader reader() function of Python, specify the path of the highway vehicle dataset dataset to be read.

[0071] The specific method of step S4 is: by importing the random module, and then calling the random static object to disrupt the order of samples in the batch, the first layer of elements in the list are randomly sorted, and the elements in the list are still lists, and the elements in the list are not sorted.

[0072] The specific method of step S5 is: randomly performing HSV transformation, translation, shearing / non-vertical projection, and perspective transformation operations on the sample data in the batch of step S4.

[0073] Specifically include:

[0074] Perform random and non-repetitive operations on 1 / 5 of the image samples, keeping them unchanged, as new image samples;

[0075] Perform random and non-repetitive HSV transformation operations on 1 / 4 of the remaining image samples as new image samples;

[0076] Perform a random and non-repetitive translation operation on 1 / 3 of the remaining image samples as new image samples;

[0077] Perform random and non-repetitive shearing / non-vertical projection operations on 1 / 2 of the remaining image samples as new image samples;

[0078] Perform a random and non-repetitive perspective transformation operation on the remaining image samples as new image samples;

[0079] As a further implementation method, the specific steps are:

[0080] Step S5-1: Convert a single image sample data from RGB to HSV. Suppose the RGB representation of the sample image is (X R ,X G ,X B ), the number of channels is 3. To describe a pixel in an image sample, if it is grayscale, only one value is needed to describe it, that is, the image is single-channel. If an image sample has a pixel, and there are three colors RGB to describe it, then the image is three-channel. First, normalize the RGB pixel values:

[0081] X′ R =X R / 255 (1)

[0082] X′ G =X G / 255 (2)

[0083] X′ B =X B / 255 (3)

[0084] Formula (1), Formula (2), and Formula (3) respectively represent the normalized pixel values.

[0085] Then, compare the maximum and minimum values ​​of the three, denoted as C max With C min , and calculate the difference between the two, recorded as Δ:

[0086] C max =max(X′ R ,X′ G ,X′ B ) (4)

[0087] C min =min(X′ R ,X′ G ,X′ B ) (5)

[0088] Δ=C max -C min (6)

[0089] Finally, calculate the HSV values ​​in the color space respectively. Where H is:

[0090]

[0091] S is:

[0092]

[0093] V is:

[0094] V=C max (9)

[0095] Step S5-2: Assume the coordinates of the selected single image sample data are (x, y), then

[0096]

[0097]

[0098] Where M T is the translation matrix, M 11 、M 12 ,...M 33 is the translation matrix parameter, where M 11 、M 22 、M 33It is a fixed value of 1; src(x,y) represents the selected single image sample, and dst(x,y) represents the translated image.

[0099] Step S5-3: Assume the coordinates of the selected single image sample data are (x, y), then

[0100]

[0101]

[0102] Where M S is the shear / non-perpendicular projection matrix, M 11 、M 12 ,...M 33 is the shear / non-vertical projection matrix parameter, where M 11 、M 22 、M 33 It is a fixed value of 1; src(x,y) represents a single selected image sample, and dst(x,y) represents the image after shearing / non-vertical projection transformation.

[0103] Step S5-4: Assume the coordinates of the selected single image sample data are (x, y), then

[0104]

[0105]

[0106] Where M P is the perspective transformation matrix, M 11 、M 12 ,...M 33 is the perspective transformation matrix parameter, where M 11 、M 22 、M 33 It is a fixed value of 1; src(x,y) represents a single image sample selected, and dst(x,y) represents the image after perspective transformation.

[0107] The specific method of step S6 is to first randomly stitch the coordinates of the reference points of the pictures (x c ,y c ), and randomly select four pictures from S5; then, the selected four pictures are resized and scaled according to the reference points, and placed at the upper left, upper right, lower left, and lower right positions of the large picture of the specified size; secondly, according to the size transformation method of each picture, the mapping relationship is mapped to the picture label; finally, according to the specified reference point coordinates, the large picture is spliced ​​and the detection box coordinates that exceed the boundary are processed. The specific steps are as follows:

[0108] Step S6-1, image segmentation, randomly select four pictures in S5, and set the size of the input picture to be (i w ,i h ); the specified image size is (w,h), where w=h=416(pixel); the size of the scaled image is (n w ,n h ):

[0109] (1) By calling the cv2.resize() function of the OpenCV library in Python, the image size is changed from (i w ,i h ) to (w,h); multiply the image size by the scaling factor R scale , where R scale is a random number between 0.6 and 0.8; then the compressed image size (n w ,n h );

[0110] (2) Generate a three-channel canvas of size (w, h), place the first compressed image at the upper left of the canvas, the second at the upper right, the third at the lower left, and the fourth at the lower right;

[0111] (3) At this time, the coordinates of the center point of the detection frame are (x c ,y c ), the coordinate adjustment ratio is make Represents the distance from the border of the artboard to the border of the scaled image in the y-axis direction. Represents the distance from the border of the artboard to the border of the scaled image in the x-axis direction.

[0112] Step S6-2, image merging:

[0113] First set the splicing line, x cut Represents the x-axis direction to divide the image into two areas, y cut Represents the y-axis direction to split the image into two pieces. Then, create a new three-channel artboard New image , the size is (416,416,3). Finally, combine the four cut images together.

[0114] Step S6-3, processing the detection box boundary:

[0115] (1) Eliminate all detection frames that are not in the area where their corresponding images are located;

[0116] (2) The detection box is partially within the image area and partially outside the image area, with the area boundary line (x cut ,y cut) replaces the out-of-bounds detection frame lines;

[0117] (3) If the height or width of the corrected detection frame is too small, the corrected frame is discarded.

[0118] The specific method of step S7 is: perform operations of flipping the new sample upside down, flipping left and right, and maintaining the original state in accordance with the uniform distribution, and randomly add noise, such as Figure 4 As shown, the specific steps are as follows:

[0119] Step S7-1,

[0120] The new image sample is flipped upside down, and the box coordinate y is flipped:

[0121] im_up=np.flipud(im), labels[:,2]=1-labels[:,2].

[0122] Step S7-2,

[0123] The new image sample is flipped left and right, and the box coordinate x is flipped:

[0124] im_right=np.fliplr(im), labels[:,1]=1-labels[:,1].

[0125] Step S7-3, randomly add Gaussian noise to the new image sample, and the probability density function of the Gaussian random variable z is given by the following formula:

[0126]

[0127] The specific method of step S8 is: check whether the samples inside the batch have been read through the DataLoader function, if so, end, otherwise return to step S6.

[0128] In the specific implementation process, Figure 5 As shown in the figure, under the same hyperparameter and training round number settings, the experimental results before and after the optimization of the data enhancement method are compared. The Mosaic method in the deep learning network reuses data while increasing the richness of samples, and has achieved quite excellent performance, with significant improvements in mAP50 and mAP50:95. Compared with the original Mosaic data enhancement, the enhanced Mosaic data enhancement method of the present invention has a more obvious improvement in the stricter mAP50:95. The enhanced Mosaic data enhancement method of the present invention performs slightly better and can almost eliminate the bottleneck of the few sample categories on the overall accuracy, proving the effectiveness of the improved data enhancement optimization method in this paper. Figure 6 , Figure 7As shown in the figure, the deep learning network has a better performance in the recognition of SUV and Family Sedan. Since the two models are similar, especially when the calibration frame is small, the two are improved by 0.5% and 0.3% respectively, and the overall performance is better.

[0129] In summary, the present invention performs data enhancement on the images in the training data set, and strengthens the recognition ability of the target recognition algorithm for overlapping targets of highway vehicles without changing the network structure. The algorithm trained by the improved data enhancement method has a higher accuracy in detecting overlapping targets of highway vehicles, which proves the effectiveness and robustness of the improved method.

[0130] Example 2

[0131] An online data enhancement system for the input end of a deep neural network for real-time vehicle detection, comprising:

[0132] The data acquisition module is configured to acquire a highway vehicle dataset and image samples;

[0133] The image processing module is configured to obtain new image samples by randomly and non-repeatedly maintaining the original sample, HSV transformation, translation, shearing / non-vertical projection, and perspective transformation operations; randomly use several pictures in the transformed image, perform image segmentation through random scaling, and then form new samples after splicing and image correction through random distribution; perform upside-down flipping, left-right flipping, and maintaining the original state operations on the new sample in accordance with uniform distribution, and randomly add Gaussian noise to obtain an enhanced image.

[0134] Example 3

[0135] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device. A method for online data enhancement at the input end of a deep neural network for real-time vehicle detection provided in this embodiment.

[0136] Example 4

[0137] A terminal device includes a processor and a computer-readable storage medium, the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded and executed by the processor. A method for online data enhancement at the input end of a deep neural network for real-time vehicle detection provided in this embodiment.

[0138] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0139] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0142] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0143] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for online data enhancement at the input end of a deep neural network for real-time vehicle detection, characterized in that: include: Step S1: Obtain highway vehicle dataset and image samples; Step S2: performing random and non-repetitive operations of maintaining the original state, HSV transformation, translation, shearing / non-vertical projection and perspective transformation on the image sample to obtain a new image sample; Specifically, it includes: performing random and non-repetitive operations on part of the image samples while keeping them unchanged as new image samples; Perform random and non-repetitive HSV transformation operations on some of the remaining image samples as new image samples; Performing a random and non-repetitive translation operation on some of the remaining image samples as new image samples; Performing random and non-repetitive shearing / non-vertical projection operations on some of the remaining image samples as new image samples; Perform a random and non-repetitive perspective transformation operation on the remaining image samples as new image samples; Step S3: randomly select a number of pictures from the new image sample, perform image segmentation by random scaling, and then form a new sample by splicing and image correction by random distribution; Step S4: Perform operations of flipping up and down, flipping left and right, and keeping the new sample as it is in accordance with uniform distribution, and randomly add Gaussian noise to finally obtain an enhanced image.

2. The method for online data enhancement at the input end of a deep neural network for real-time vehicle detection according to claim 1, characterized in that: The step S1 acquires a highway vehicle data set and image samples, including collecting image samples at different angles, different road sections, and different lighting conditions in the highway monitoring video.

3. The method for online data enhancement at the input end of a deep neural network for real-time vehicle detection according to claim 1, characterized in that: The random and non-repetitive operation of maintaining the original state of the image samples includes normalizing the pixel values ​​in the image samples, obtaining the maximum and minimum values ​​of the pixel values ​​and their differences, and calculating the HSV values ​​in the color space respectively.

4. The method for online data enhancement at the input end of a deep neural network for real-time vehicle detection according to claim 1, characterized in that: The random and non-repetitive translation operation of the image sample specifically includes: assuming that the data coordinates of the selected single image sample are (x, y), then Where M T is the translation matrix, M 11 、M 12 ,...M 33 is the translation matrix parameter, where M 11 、M 22 、M 33 is a fixed value of 1; src(x,y) represents the selected single image sample, and dst(x,y) represents the translated image.

5. The method for online data enhancement at the input end of a deep neural network for real-time vehicle detection according to claim 1, characterized in that: The random and non-repetitive shearing / non-vertical projection operation on the image sample specifically includes: assuming that the data coordinates of the selected single image sample are (x, y), then Where M S is the shear / non-perpendicular projection matrix, M 11 、M 12 ,...M 33 is the shear / non-vertical projection matrix parameter, where M 11 、M 22 、M 33 It is a fixed value of 1; src(x,y) represents a single selected image sample, and dst(x,y) represents the image after shearing / non-vertical projection transformation.

6. The method for online data enhancement at the input end of a deep neural network for real-time vehicle detection according to claim 1, characterized in that: The random and non-repetitive perspective transformation operation on the image sample specifically includes: assuming that the data coordinates of the selected single image sample are (x, y), then Where M P is the perspective transformation matrix, M 11 、M 12 ,...M 33 is the perspective transformation matrix parameter, where M 11 、M 22 、M 33 It is a fixed value of 1; src(x,y) represents a single image sample selected, and dst(x,y) represents the image after perspective transformation.

7. The method for online data enhancement at the input end of a deep neural network for real-time vehicle detection according to claim 1, characterized in that: The image correction includes removing the detection frame of the spliced ​​image that is not in the area where the corresponding image is located, making part of the detection frame in the image area and part of it not in the image area, and replacing the out-of-bounds detection frame lines with the area boundary line of the image.

8. An online data enhancement system for the input end of a deep neural network for real-time vehicle detection, characterized in that: include: The data acquisition module is configured to acquire a highway vehicle dataset and image samples; The image processing module is configured to obtain new image samples by performing random and non-repetitive operations of maintaining the original sample as it is, HSV transformation, translation, shearing / non-vertical projection, and perspective transformation on the original sample; randomly use several pictures in the transformed image, perform image segmentation through random scaling, and then form new samples after splicing and image correction through random distribution; perform operations of flipping up and down, flipping left and right, and maintaining the original state on the new sample in accordance with uniform distribution, and randomly add Gaussian noise to finally obtain an enhanced image.

9. A computer-readable storage medium, characterized in that: A plurality of instructions are stored therein, and the instructions are suitable for being loaded by a processor of a terminal device and executed in accordance with any one of claims 1 to 7, in accordance with an online data enhancement method for the input end of a deep neural network for real-time detection of a vehicle.

10. A terminal device, characterized in that: It includes a processor and a computer-readable storage medium, the processor is used to implement each instruction; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded and executed by the processor. A method for online data enhancement at the input end of a deep neural network for real-time vehicle detection according to any one of claims 1-7.