License plate desensitization method based on step-by-step detection and parallel technology
By employing stepwise detection and parallel technology, the vehicle area is detected first, followed by license plate detection. Multiple license plate detection networks are used for parallel processing, combined with mosaic processing, which solves the problems of low efficiency and poor real-time performance of license plate detection in intelligent connected vehicles, achieving efficient and accurate license plate desensitization.
Patent Information
- Application Number
- CN202411170875.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-08-26
AI Technical Summary
Existing technologies for license plate detection in intelligent connected vehicles suffer from low efficiency and poor real-time performance under limited computing power, failing to meet the requirements for real-time performance and accuracy.
The method employs stepwise detection and parallel processing techniques, first detecting the vehicle area and then performing license plate detection within the vehicle area. Multiple identical license plate detection networks are used for parallel processing, and mosaic processing is combined to achieve license plate desensitization.
It improves the accuracy and real-time performance of license plate detection, reduces computational complexity, adapts to the needs of different computing resources, and meets the application requirements of devices with limited computing power.
Smart Images

Figure CN118887651B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision and artificial intelligence, and particularly relates to a license plate desensitization method based on step-by-step detection and parallel technology. BACKGROUND
[0002] With the deep integration of the fields of automobile information communication, artificial intelligence and the Internet, intelligent networked vehicles are in an era of rapid technological evolution. The realization of automatic driving technology must rely on the perception data of the external physical world, however, the uploading of massive data may lead to the risk of sensitive data leakage. In order to solve this problem, intelligent networked vehicles need to desensitize the video outside the vehicle containing the license plate.
[0003] Desensitizing the license plate first requires real-time and accurate detection of the license plate in the video outside the vehicle. There are three main types of current license plate detection algorithms, the first type is a traditional image processing positioning method, the second type is a traditional machine learning algorithm, and the third type is a deep learning method.
[0004] However, in the actual application of intelligent networked vehicles, the limited computing power conditions and the requirement of real-time pose challenges to existing license plate detection methods. Since the license plate detection method with high accuracy often has high computational complexity, under the condition of limited computing power, it may lead to high delay and energy consumption, which cannot meet the real-time requirement, and even negatively affect the accuracy of detection. Therefore, how to realize real-time and accurate license plate detection under the limitation of limited computing power of hardware devices still needs further research and development of more efficient algorithms and optimization techniques. SUMMARY
[0005] In view of the above problems, the present application provides a license plate desensitization method based on step-by-step detection and parallel technology, which solves the technical problems of low detection efficiency and poor real-time performance of the license plate desensitization in the prior art.
[0006] The present application provides a license plate desensitization method based on step-by-step detection and parallel technology, comprising the following steps:
[0007] Step S1, performing size adjustment, denoising and image enhancement preprocessing on the original image or video data collected by the intelligent networked vehicle to obtain an image sequence;
[0008] Step S2, for the images in the image sequence, obtaining vehicle region coordinates by using a vehicle detection network, and obtaining a vehicle region sub-image by cropping from the image based on the vehicle region coordinates;
[0009] Step S3, performing multi-thread parallel detection on the vehicle region sub-image by using a plurality of same license plate detection networks to obtain license plate region coordinates;
[0010] Step S4, obtaining license plate content based on the license plate region coordinates, and performing desensitization requirement judgment on the license plate content to screen out license plate region coordinates meeting the desensitization requirement;
[0011] Step S5, performing mosaic processing on the image sequence based on the license plate region coordinates meeting the desensitization requirement, and outputting the desensitized image sequence.
[0012] Preferably, step S1 specifically comprises: judging the type of the original image or video data, if the input data is a video, saving the video frame by frame as an image and then performing preprocessing, and if the input data is an image, directly performing preprocessing; the preprocessing process comprises size adjustment, denoising and image enhancement of each image, and the processed image is saved as the image sequence.
[0013] Preferably, step S3 specifically comprises:
[0014] Step S3-1, determining the number of license plate detection networks, and dividing the vehicle region sub-image into multiple batches, the number of vehicle region sub-images in each batch being the same as the number of license plate detection networks;
[0015] Step S3-2, for the vehicle region sub-image in one batch, creating multiple threads, each vehicle region sub-image corresponding to one thread, each thread using one license plate detection network to perform license plate detection, and waiting for all threads to be processed, and then summarizing the coordinate results of the license plate region in this batch;
[0016] Step S3-3, returning to step S3-2, processing the images of each batch in order of batch number until the processing of all batches is completed;
[0017] Step S3-4, summarizing the processing results of all batches of images to obtain all license plate region coordinates.
[0018] Preferably, step S3-1 specifically comprises:
[0019] The input vehicle region sub-image is represented as a sequence: {I1, I2, I3, I4,..., In}, where n is the total number of images, In is the nth image in the image sequence, and the batch after allocation is: n n
[0020] B j = {I (j -1) ×k+1 ,I (j -1) ×k+2 ,...,I j×k+k
[0021] where B j denotes the jth image batch, j is the number of the batch, and k is the number of the license plate detection network.
[0022] Preferably, step S3-2 specifically comprises:
[0023] threads {T1, T2,..., Tk} are created, where k is the number of the license plate detection network, and in each batch, thread T1 processes I k , thread T2 processes I (j , and so on until thread Tk processes I ×k+1 ; the license plate detection network in each thread obtains the coordinates of the license plate region in each vehicle region sub-image, and after waiting for all threads to complete processing, the coordinates of the license plate region in this batch are summarized. (j ×k+2 k (j ×k+k
[0024] Preferably, step S4 specifically comprises: judging whether the resolution, minimum illumination, and geometric distortion of the license plate content meet the requirements, and determining the license plate region coordinates corresponding to the license plate content that meets the desensitization requirements as the license plate region coordinates that meet the desensitization requirements.
[0025] Preferably, step S5 specifically comprises:
[0026] Step S5-1: For the images in the image sequence, based on the license plate region coordinates that meet the desensitization requirements, the image in the coordinate region is extracted;
[0027] Step S5-2: The extracted image in the coordinate region is reduced by a specified multiple using a linear interpolation method;
[0028] Step S5-3: The reduced image is enlarged back to the size of the coordinate region using a nearest neighbor interpolation method;
[0029] Step S5-4: The processed image is used to replace the image in the coordinate region in the original image;
[0030] Step S5-5: Return to step S5-1, process all the images in the image sequence, and finally obtain the image sequence with added mosaics as the output desensitized image sequence.
[0031] Preferably, the vehicle detection network is obtained through training, and the training steps include:
[0032] The training data for the vehicle detection network is prepared, specifically including:
[0033] (1) Collect image data containing vehicles, and the sources of the image data include camera shooting, image database, or network collection;
[0034] (2) annotating the vehicle region in the image data containing the vehicle, the annotation including manual annotation or automatic annotation using an image processing algorithm;
[0035] (3) standardizing the annotated vehicle region, the standardization including adjusting image size, adjusting brightness, and adjusting contrast;
[0036] (4) constructing a vehicle image training data set using the annotated and standardized vehicle image, and using the vehicle image data set to train a vehicle detection model.
[0037] determining the model configuration of the vehicle detection network, including determining the network structure and setting the hyperparameters for training;
[0038] training the vehicle detection network based on the training data and the model configuration.
[0039] Preferably, the license plate detection network is obtained through training, and the training step includes:
[0040] preparing training data for the license plate detection network, specifically including:
[0041] (1) collecting image data containing license plates, the source of the image data including camera shooting, image database, or network collection;
[0042] (2) annotating the license plate region in the image data containing the license plate, the annotation including manual annotation or automatic annotation using an image processing algorithm;
[0043] (3) standardizing the annotated license plate region, the standardization including adjusting image size, adjusting brightness, and adjusting contrast;
[0044] (4) constructing a license plate image training data set using the annotated and standardized license plate image, and using the license plate image data set to train a license plate detection model.
[0045] determining the model configuration of the license plate detection network, including determining the network structure and setting the hyperparameters for training;
[0046] training the license plate detection network based on the training data and the model configuration.
[0047] Compared with the prior art, the present application has at least the following beneficial effects:
[0048] (1) The present application adopts a step-by-step processing technology of detecting vehicles first and then detecting license plates. After detecting vehicles, license plate detection is only needed in the vehicle area, reducing the image area that needs to be processed, thereby reducing the computational complexity and search space, so that the detection algorithm can run more efficiently. Moreover, the license plate detection is limited in a smaller specific area, reducing the interference of background clutter and other irrelevant areas, which helps to improve the accuracy of license plate detection.
[0049] (2) The present application provides a method for parallel processing of multiple single-target detection networks, which can effectively improve the data processing speed to meet the real-time requirements of license plate desensitization, while ensuring the consistency of the output results and the order of the input image sequence. Multiple identical single-target detection networks have strong scalability and flexibility, and the number of networks can be increased or decreased according to actual needs to adapt to different computing resources or performance requirements, suitable for limited computing power devices. BRIEF DESCRIPTION OF DRAWINGS
[0050] The accompanying drawings are included to provide a further understanding of the present application, and are incorporated herein and constitute a part of the detailed description. It should be noted that the drawings illustrate only some embodiments of the present application and therefore should not be considered to narrow the scope of the present application.
[0051] Figure 1 The flowchart of the license plate desensitization method based on step-by-step detection and parallel technology provided by the present application.
[0052] Figure 2 The schematic diagram of network composition and interaction of each module provided by the present application.
[0053] Figure 3 The algorithm step schematic diagram of the license plate desensitization method based on step-by-step detection and parallel technology provided by the present application in the test / application stage.
[0054] Figure 4 The algorithm step schematic diagram of the license plate desensitization method based on step-by-step detection and parallel technology provided by the present application in the training stage. DETAILED DESCRIPTION
[0055] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict. In addition, the present application can also be implemented in other ways different from those described herein, therefore, the protection scope of the present application is not limited by the specific embodiments disclosed below.
[0056] In order to illustrate the effectiveness of the method proposed in the present application, the above technical solutions of the present application will be described in detail through a specific embodiment as follows: Figure 1 As shown in the figure, a license plate desensitization method based on step-by-step detection and parallel technology is disclosed, and the specific implementation steps are as follows:
[0057] Step S1, pre-processing of denoising and enhancement on the original image or video collected by the intelligent connected vehicle, to obtain an image sequence;
[0058] In this step, the input original data to be detected is the original image or video collected by the intelligent connected vehicle. First, the type of input data is judged. If the input data is a video, the video is saved frame by frame as an image for pre-processing. If the input data is an image, it is directly pre-processed. The pre-processing process includes size adjustment, denoising and enhancement of each image, and the processed image is saved as an image sequence.
[0059] In some embodiments, the size adjustment process can use an interpolation algorithm to scale the image to ensure that all images have the same size, and a black or white border can be added around the image to maintain the aspect ratio of the image. The denoising process can use Gaussian filtering, median filtering or mean denoising to reduce image noise. The enhancement process can use histogram equalization, gamma correction, sharpening and color enhancement to improve the effectiveness of the information in the image. The specific methods of size adjustment, denoising and enhancement processing are not limited in the present application.
[0060] Step S2, using a vehicle detection network to obtain vehicle region coordinates for the images in the image sequence, and cutting a vehicle region sub-image from the image based on the vehicle region coordinates.
[0061] In this step, a trained vehicle detection network is first loaded, and then each image in the image sequence is traversed. The image is input into the vehicle detection network, and the vehicle region coordinates in the image are obtained through forward calculation.
[0062] In some embodiments, the vehicle region coordinates include the coordinates of the top-left corner vertex and the bottom-right corner vertex of the rectangular frame in which the vehicle is located in the image, represented as [x1, y1, x2, y2], x1 and y1 are the horizontal and vertical coordinates of the top-left corner vertex in the image, and x2 and y2 are the horizontal and vertical coordinates of the bottom-right corner vertex in the image.
[0063] Based on the vehicle region coordinates, the image is cropped to obtain the region where the vehicle is located in the image as the vehicle region sub-image.
[0064] Step S3, using multiple identical license plate detection networks to perform parallel detection on the vehicle region sub-image to obtain license plate region coordinates.
[0065] In this step, the present application uses multiple identical license plate detection networks to perform parallel processing on the input vehicle region sub-image. Specifically, the cropped vehicle region sub-image is processed in parallel using a multi-thread processing mode.
[0066] In this embodiment, three identical license plate detection networks, Network A, Network B, and Network C, are used. The specific steps are as follows:
[0067] 1) Image allocation: The cropped vehicle region sub-image sequence is evenly divided into multiple batches based on the number of license plate detection networks. For example, the input vehicle region sub-image is represented as a set of image sequences: {I1,I2,I3,I4,...,I n}, where n is the total number of images, I n is the nth image in the image sequence. Then the batch after allocation is:
[0068] B j ={I (j -1) ×k+1 ,I (j -1) ×k+2 ,...,I j×k+k}
[0069] Among them, B j represents the jth image batch, j is the batch number, k is the number of license plate detection networks, and in this embodiment, k=3. Thus, the batch after allocation is:
[0070] B1={I1,I2,I3},B2={I4,I5,I6},B3={I7,I8,I9},L
[0071] Because the operating system schedules parallel processing threads in an undefined order, the order of the processing results obtained after multi-threaded processing may not match the order of the input image sequence. To address this issue, the present invention provides the aforementioned image allocation method, which divides the input sequence into batches based on the number of license plate detection networks and resolves this issue through subsequent steps.
[0072] 2) Use multi-threading to process each batch of images.
[0073] In this step, batches of images are processed in the order of their batch numbers. For example, after batch B1 is completed, batch B2 is processed, and so on. For each batch of images, multiple threads are created, and each thread uses the license plate detection network to perform license plate detection.
[0074] When processing a batch, k threads are created. In this embodiment, k=3. Each thread corresponds to the processing of a license plate detection network. Thread A corresponds to Network A, thread B corresponds to Network B, and thread C corresponds to Network C. For the j-th image batch, thread A processes the first item I (j -1) ×k+1Thread B processes the 2nd item I (j -1) ×k+2 Thread C processes the 3rd item I (j -1) ×k+k The processing is performed. The license plate detection network in each thread obtains the coordinates of the license plate region in each vehicle region subgraph.
[0075] After waiting for each thread to complete processing, the coordinates of the license plate regions in the batch are summarized. Then the next batch is executed until all batches are completed.
[0076] In this embodiment, the specific process of multi-thread processing is illustrated as follows:
[0077] Batch B1: Thread A processes image 1, thread B processes image 2, and thread C processes image 3. Each thread runs in parallel, and after waiting for each thread to complete processing, the results of batch B1 are summarized.
[0078] Batch B2: Thread A processes image 4, thread B processes image 5, and thread C processes image 6. Each thread runs in parallel, and after waiting for each thread to complete processing, the results of batch B2 are summarized.
[0079] In this way, the processing of all batches is completed.
[0080] 3) Summarize the processing results of all batches of images to obtain all license plate region coordinates.
[0081] In the above manner, the present application controls the order of batches to ensure that the processing of the next batch is started only after the completion of the processing of the previous batch. Within each batch, the thread number and image order are bound, thereby ensuring the sequential nature of the processing within and outside the batch. Ultimately, the multi-thread parallel processing improves the processing efficiency while ensuring the sequential nature of the processing.
[0082] Step S4: Obtain the license plate content based on the license plate region coordinates, and perform desensitization requirement judgment on the license plate content to screen out license plate region coordinates that meet the desensitization requirements.
[0083] In this step, the resolution, minimum illumination, and geometric distortion of the license plate can be judged according to the requirements of the desensitization standard to determine whether they meet the standard. The license plate region coordinates corresponding to the license plate content that meets the standard are determined as the license plate region coordinates that meet the desensitization requirements.
[0084] In some embodiments, the way to determine the resolution of the license plate can be to calculate the pixel width and height of the image and compare them with preset minimum pixel width and height. The way to determine the minimum illumination can be to analyze the brightness histogram of the image to determine whether the average brightness value of the image is higher than the preset threshold. The way to determine the geometric distortion can be to use an edge detection algorithm to analyze the straightness and proportional relationship of the license plate edge to determine whether there is obvious geometric distortion in the license plate region.
[0085] Step S5, based on the license plate region coordinates meeting the desensitization requirements, mosaic processing is performed on the image sequence, and a desensitized image sequence is output. The processing process is specifically:
[0086] 1) For the images in the image sequence, based on the license plate region coordinates meeting the desensitization requirements, the image of the coordinate region is extracted.
[0087] In some embodiments, the license plate region coordinates meeting the desensitization requirements can include the coordinates of the top left corner of the license plate region rectangular frame meeting the desensitization requirements, and the width and height of the rectangular frame, denoted as [x, y, w, h], x and y are the horizontal and vertical coordinates of the top left corner in the image, and w and h are the width and height of the rectangular frame, respectively.
[0088] 2) Using linear interpolation, the extracted image of the coordinate region is reduced by a specified multiple.
[0089] In some embodiments, the specified reduction of the image region can be realized by using the cv2 module of the Python language, and the corresponding code is:
[0090] roi=cv2.resize(roi,(w / / self.kernel_size,h / / self.kernel_size),interpolation=cv2.INT ER_LINEAR)
[0091] 3) Using nearest neighbor interpolation, the reduced image is enlarged back to the size of the coordinate region.
[0092] In some embodiments, the image enlargement can be realized by using the cv2 module of the Python language, and the corresponding code is:
[0093] roi=cv2.resize(roi,(w,h),interpolation=cv2.INTER_NEAREST)
[0094] 4) The processed image is used to replace the image of the coordinate region in the original image;
[0095] 5) processing all the images in the image sequence, finally obtaining a mosaicked image sequence as the output desensitized image sequence.
[0096] In some embodiments, the above-mentioned method of the present application can be implemented in Python language, using a modular program structure, by combining different functional modules to realize the detection and desensitization processing of the license plate in the input image. To ensure the modularity and data interaction of the system, the construction of each functional component of the system is as follows: all program modules interact with data through standard interfaces, and each program module realizes the functions of vehicle region cropping, license plate desensitization requirement judgment, coordinate calculation and data desensitization, etc. Each program module is as follows:
[0097] 1) Input module: receiving video stream or image as input, obtaining frame sequence.
[0098] 2) Vehicle detection module: detecting vehicles using the trained YOLOv8 network and labeling the coordinate position of vehicles in each frame of image.
[0099] 3) Vehicle strategy module: cropping and recording the coordinates of the detected vehicles to obtain vehicle images and vehicle region coordinates.
[0100] 4) License plate detection module: using three trained YOLOv8 networks to detect the license plate in the vehicle region in parallel to obtain the coordinates of the license plate in the vehicle image.
[0101] 5) License plate strategy module: judging the desensitization requirements of the detected license plate region, recording the coordinates of those that meet the requirements, and discarding the coordinates of those that do not meet the requirements.
[0102] 6) Coordinate calculation module: calculating the coordinates of the license plate region in the original image based on the vehicle region coordinates and the license plate region coordinates that meet the desensitization requirements.
[0103] 7) Data desensitization module: using the mosaic method to desensitize the license plate region in the original image that meets the desensitization requirements.
[0104] 8) Main module: integrating the above modules to output the desensitized image / video frame.
[0105] The present application provides the pseudo code of the license plate desensitization method, as shown in Table 1:
[0106] Table 1
[0107]
[0108] The present application also discloses the training method of the vehicle detection network and the license plate detection network, including the following steps:
[0109] Preparation of training data for the vehicle detection network and the license plate detection network, including collecting image data, labeling image data, labeling region standardization processing, and constructing a training data set.
[0110] 1) Collect a large amount of vehicle and license plate related image data and organize and arrange it. These image data can come from various sources such as cameras, image databases or the Internet.
[0111] 2) Label the vehicle and license plate region, i.e. mark the vehicle and license plate region in the image. This can be achieved by manual annotation or automatic annotation using image processing algorithms.
[0112] 3) Standardize the labeled vehicle and license plate region to adapt to the input requirements of the network model. This includes adjusting image size, adjusting brightness and contrast, etc. to ensure the consistency and trainability of the input data.
[0113] 4) Construct two training data sets of vehicle images and license plate images. The labeled and standardized vehicle images and license plate images are constructed into two independent data sets. The vehicle image data set is used to train the vehicle detection model, and the license plate image data set is used to train the license plate detection and recognition model.
[0114] Determine the model configuration of the vehicle detection network and the license plate detection network, including determining the network structure and setting the hyperparameters of the training.
[0115] 1) Determine the network structure, in this step, the network structure of the vehicle detection network and the license plate detection network both include an input layer, multiple convolutional layers, multiple pooling layers and a fully connected layer. Among them, the input layer is set to appropriate size according to the size of the input image; the convolutional layer uses multiple convolutional layers to extract image features. Different convolution kernel size and number can be selected according to demand; the pooling layer uses a pooling layer after the convolutional layer for down-sampling to reduce the size of the feature map; multiple combinations of convolution and pooling layers can be repeated according to need to increase the depth and expression ability of the network; the fully connected layer connects the output of the last convolutional layer to the fully connected layer for generating the final prediction result.
[0116] In some embodiments, the network structure of the vehicle detection network and the license plate detection network can adopt YOLOv8 network, and the present application does not limit the specific target detection network adopted.
[0117] 2) Set the hyperparameters of the training, in this step, set the hyperparameters of the vehicle detection network and license plate detection network, which can include: learning rate, batch size, iteration number, activation function and loss function. Among them, the learning rate refers to the speed of parameter update; the batch size is the number of samples used for each training; the iteration number is the number of network training iterations; appropriate activation functions can be selected, such as ReLU, LeakyReLU, etc.; loss functions suitable for the target task can be used, such as cross-entropy loss, mean square error loss, etc.
[0118] Train the vehicle detection network and license plate detection network based on the training data and model configuration. This step specifically includes:
[0119] 1) Input the image into the network, and use the back propagation algorithm and optimizer to adjust the weights and parameters of the network, so that it can accurately detect vehicles and license plates.
[0120] 2) Use data augmentation techniques such as random cropping, rotation, translation, etc. to increase the diversity and quantity of data and improve the generalization ability of the model.
[0121] 3) Divide the training set and the validation set. Divide the data set into training set and validation set for model evaluation and adjustment in the training process. Generally, the training set is used for parameter update and model training, while the validation set is used to monitor the performance of the model and optimize the hyperparameters.
[0122] 4) Model training and optimization. Use the image data in the training set as input, update the weights and parameters of the network through the back propagation algorithm and optimizer (such as stochastic gradient descent). In each training iteration, calculate the value of the loss function, and update the parameters of the model according to the gradient of the loss function, gradually optimizing the performance of the model.
[0123] 5) Verify the performance of the model. Use the image data in the validation set to input the trained model, calculate the predicted results of the model, and compare them with the labels. According to the evaluation indicators (such as accuracy, recall rate, etc.), evaluate the performance of the model, and adjust and optimize the model according to the needs.
[0124] 6) Repeat the training and verification process. According to the results of the validation set, adjust and optimize the model, such as adjusting the learning rate, increasing the number of training iterations, etc. Repeat the iterative process of training and verification until the model reaches the expected performance level. Through step-by-step iterative training and adjustment of the model, it can achieve high accuracy and robustness in vehicle and license plate detection tasks.
[0125] The application is a license plate method based on step-by-step detection and parallel technology, which adopts step-by-step processing and parallel technology of multiple single target detection networks, realizes the application requirements of high accuracy, real-time and sequence of license plate desensitization under the limitation of limited computing power, effectively solves the application conflict problem of computing power consumption and target detection.
[0126] The detailed description of the application, although using a specific order to describe each action or step, should be understood as requiring such actions or steps to be performed in the specific order shown or in a sequential order, or requiring all illustrated actions or steps to be performed to achieve the desired results. In certain circumstances, multi-tasking and parallel processing can be advantageous. Similarly, although the above discussion contains many specific implementation details, these should not be interpreted as limiting the scope of the disclosure. Certain features described in the context of separate embodiments can also be combined in a single implementation. Conversely, various features described in the context of a single implementation can also be implemented separately or in any suitable subcombination. The above description is merely the preferred specific implementation of the application, but the scope of protection of the application is not limited thereto, and any changes or replacements within the scope of the technology disclosed by the application can be easily thought of by those skilled in the art, which should be covered within the scope of protection of the application.
[0127] The above description is merely the preferred specific implementation of the application, but the scope of protection of the application is not limited thereto, and any changes or replacements within the scope of the technology disclosed by the application can be easily thought of by those skilled in the art, which should be covered within the scope of protection of the application.
Claims
1. A license plate desensitization method based on step-by-step detection and parallel technology, characterized in that, The method comprises the following steps: Step S1, preprocessing the original image or video data collected by the intelligent connected vehicle by adjusting the size, removing noise and image enhancement, and obtaining an image sequence; Step S2, for the images in the image sequence, obtaining vehicle region coordinates by using a vehicle detection network, and cropping vehicle region sub-images from the images based on the vehicle region coordinates; Step S3, using multiple identical license plate detection networks to perform multi-thread parallel detection on the vehicle region sub-images, and obtaining license plate region coordinates; Step S3 specifically comprises: Step S3-1, determining the number of license plate detection networks, and dividing the vehicle region sub-images into multiple batches, the number of vehicle region sub-images in each batch being the same as the number of license plate detection networks; Step S3-2, for the vehicle region sub-images in a batch, creating multiple threads, each vehicle region sub-image corresponding to a thread, and each thread using a license plate detection network for license plate detection, waiting for all threads to be processed, and then summarizing the coordinate results of the license plate regions in this batch; Step S3-3, returning to step S3-2, processing the images in each batch in order according to the batch number until all batches are processed; Step S3-4, summarizing the processing results of all batches of images to obtain all license plate region coordinates; Step S4, obtaining license plate content based on the license plate region coordinates, judging the license plate content according to desensitization requirements, and screening out license plate region coordinates that meet the desensitization requirements; Step S5, based on the license plate region coordinates that meet the desensitization requirements, performing mosaic processing on the image sequence, and outputting the desensitized image sequence; Step S5 specifically comprises: Step S5-1, for the images in the image sequence, extracting the image in the coordinate region based on the license plate region coordinates that meet the desensitization requirements; Step S5-2, using linear interpolation method to reduce the extracted coordinate region image by a specified multiple; Step S5-3, using nearest neighbor interpolation method to enlarge the reduced image back to the size of the coordinate region; Step S5-4, replacing the image in the coordinate region with the processed image; Step S5-5, returning to step S5-1, processing all images in the image sequence to finally obtain the image sequence with added mosaic as the output desensitized image sequence.
2. The method for license plate desensitization based on stepwise detection and parallel technique as claimed in claim 1, wherein, Step S1 specifically comprises: judging the type of the original image or video data, if the input data is a video, saving the video frame by frame as an image for preprocessing, if the input data is an image, directly preprocessing; the preprocessing process includes adjusting the size, removing noise and image enhancement of each image, and saving the processed image as the image sequence.
3. The method for license plate desensitization based on stepwise detection and parallel technique as claimed in claim 2, wherein, Step S3-1 specifically comprises: The input vehicle region submap is represented as a sequence: where, is the total number of images, is the i-th image in the sequence, is the assigned batch. wherein, represents the batch of images, is the number of the batch, is the number of license plate detection networks.
4. The method for license plate desensitization based on stepwise detection and parallel technology according to claim 3, characterized in that, Step S3-2 specifically comprises: creating threads wherein the number of license plate detection networks, in each batch, a thread processes , a thread processes , and so on until a thread processes ; the license plate detection network in each thread obtains the coordinates of the license plate region in the vehicle region subgraph, and after waiting for all threads to complete processing, the coordinates of the license plate region in this batch are summarized.
5. The method for license plate desensitization based on stepwise detection and parallel technique according to claim 4, characterized in that, Step S4 specifically comprises: judging whether the resolution, minimum illumination and geometric distortion of the license plate content meet the requirements, and determining the license plate region coordinates corresponding to the license plate content that meet the desensitization requirements as the license plate region coordinates that meet the desensitization requirements.
6. The method of desensitizing license plates based on stepwise detection and parallel technology according to any one of claims 1-5, characterized in that, The vehicle detection network is obtained through training, and the training steps include: Preparing training data for the vehicle detection network, specifically including: (1) Collecting image data containing vehicles, the sources of the image data including camera shooting, image database or network collection; (2) Labeling vehicle regions in the image data containing vehicles, the labeling methods including manual labeling or automatic labeling using image processing algorithms; (3) Standardizing the labeled vehicle regions, the standardization including adjusting image size, adjusting brightness and adjusting contrast; (4) Constructing a vehicle image training data set using the labeled and standardized vehicle images, and using the vehicle image data set to train a vehicle detection model; Determining the model configuration of the vehicle detection network, including determining the network structure and setting the training hyperparameters; Training the vehicle detection network based on the training data and the model configuration.
7. The method of desensitizing license plates based on stepwise detection and parallel technology according to any one of claims 1-5, characterized in that, The trained license plate detection network is obtained, and the training steps include: Preparing training data for the license plate detection network, specifically including: (1) Collecting image data containing license plates, the sources of the image data including camera shooting, image database or network collection; (2) Labeling license plate regions in the image data containing license plates, the labeling methods including manual labeling or automatic labeling using image processing algorithms; (3) Standardizing the labeled license plate regions, the standardization including adjusting image size, adjusting brightness and adjusting contrast; (4) Constructing a license plate image training data set using the labeled and standardized license plate images, and using the license plate image data set to train a license plate detection model; Determining the model configuration of the license plate detection network, including determining the network structure and setting the training hyperparameters; Training the license plate detection network based on the training data and the model configuration.
Citation Information
Patent Citations
Unmanned aerial vehicle degraded insulator detection method and system based on target identification
CN116665080A
License plate and face image desensitization method and device, computer equipment and storage medium
CN118314537A
Cited By
License plate detection and desensitization method fusing spatial correction and multi-scale attention mechanism
CN121354085A