License plate desensitization method based on step-by-step detection and parallel technology
Through step-by-step detection and parallel technology processing of license plate areas, the problems of license plate detection delay and energy consumption in intelligent connected vehicles are solved, efficient and real-time license plate detection is achieved, and detection accuracy and adaptability are improved.
Patent Information
- Application Number
- CN202411170875.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-26
AI Technical Summary
The existing license plate detection methods in intelligent connected vehicles have high computing complexity, resulting in increased detection delay and energy consumption, which cannot meet real-time requirements, and the detection accuracy is affected.
The license plate desensitization method based on step-by-step detection and parallel technology is adopted. By pre-processing video data, the vehicle area is cut, the license plate area is detected in parallel using multi-threaded parallel, and mosaic processing is performed according to the desensitization requirements, reducing the computational complexity and improving detection efficiency.
It realizes efficient and real-time license plate detection on limited computing power equipment, reduces background interference, improves detection accuracy, and adapts to different computing resource needs.
Smart Images

Figure CN118887651A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision and artificial intelligence, and in particular to a license plate desensitization method based on step-by-step detection and parallel technology. Background Art
[0002] With the deep integration of automotive information communication, artificial intelligence and the Internet, smart connected cars are in an era of rapid technological evolution. The realization of autonomous driving technology must rely on the perception data of the external physical world, but the uploading of massive data may lead to the risk of sensitive data leakage. In order to solve this problem, smart connected cars need to desensitize the external video containing the license plate.
[0003] To desensitize the license plate, we first need to achieve real-time and accurate detection of the license plate in the video outside the car. There are three main types of license plate detection algorithms at present: the first is the traditional image processing positioning method, the second is the traditional machine learning algorithm, and the third is the deep learning method.
[0004] However, in the actual application of intelligent connected vehicles, limited computing power and the requirement for real-time performance pose challenges to existing license plate detection methods. Since license plate detection methods with higher accuracy often have higher computational complexity, under limited computing power conditions, they may lead to higher latency and energy consumption, fail to meet real-time requirements, and even have a negative impact on detection accuracy. Therefore, how to achieve real-time and accurate license plate detection under the constraints of hardware devices with limited computing power still requires further research and development of more efficient algorithms and optimization technologies. Summary of the invention
[0005] In view of the above problems, the present invention provides a license plate desensitization method based on step-by-step detection and parallel technology, which solves the technical problems of low efficiency and poor real-time performance of license plate desensitization detection in the prior art.
[0006] The present invention provides a license plate desensitization method based on step-by-step detection and parallel technology, comprising the following steps:
[0007] Step S1, performing resizing, denoising, and image enhancement preprocessing on the original image or video data collected by the intelligent network-connected vehicle to obtain an image sequence;
[0008] Step S2: for an image in the image sequence, using a vehicle detection network to obtain vehicle region coordinates, and cropping the image based on the vehicle region coordinates to obtain a vehicle region sub-image;
[0009] Step S3, using multiple identical license plate detection networks to perform multi-threaded parallel detection on the vehicle area sub-image to obtain the license plate area coordinates;
[0010] Step S4, obtaining license plate content based on the license plate area coordinates, performing desensitization requirements on the license plate content, and screening out license plate area coordinates that meet the desensitization requirements;
[0011] Step S5: Based on the license plate area coordinates that meet the desensitization requirements, mosaic processing is performed on the image sequence, and the desensitized image sequence is output.
[0012] Preferably, step S1 specifically includes: 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 preprocessing it; if the input data is an image, directly preprocessing it; the preprocessing process includes resizing, denoising and image enhancement of each image, and saving the processed image as the image sequence.
[0013] Preferably, step S3 specifically includes:
[0014] Step S3-1, determining the number of license plate detection networks, and evenly dividing the vehicle region sub-images into multiple batches, wherein the number of vehicle region sub-images in each batch is the same as the number of license plate detection networks;
[0015] Step S3-2: for a batch of vehicle area sub-images, create multiple threads, one for each vehicle area sub-image, each thread uses a license plate detection network to perform license plate detection, and after each thread has completed processing, summarize the coordinate results of the license plate area of this batch;
[0016] Step S3-3, return to step S3-2, and process the images of each batch according to the order of the batch numbers until all batches are processed;
[0017] Step S3-4: Summarize the processing results of all batches of images to obtain the coordinates of all license plate areas.
[0018] Preferably, step S3-1 specifically includes:
[0019] The input vehicle area subgraph is represented as a sequence: {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:
[0020] B j = {I (j -1) ×k+1 ,I (j -1) ×k+2 ,...,I j×k+k}
[0021] Among them, B jrepresents the j-th image batch, j is the batch number, and k is the number of license plate detection networks.
[0022] Preferably, step S3-2 specifically includes:
[0023] Create threads {T1,T2,...,T k}, where k is the number of license plate detection networks. In each batch, thread T1 performs (j -1) ×k+1 Processing, thread T2 to I (j -1) ×k+2 Processing, and so on, until thread T k to I (j -1) ×k+k Processing; the license plate detection network in each thread obtains the coordinates of the license plate area in each vehicle area sub-map, and after waiting for each thread to complete the processing, summarizes the coordinate results of the license plate area of this batch.
[0024] Preferably, step S4 specifically includes: judging whether the resolution, minimum illumination and geometric distortion of the license plate content meet the requirements, and determining the license plate area coordinates corresponding to the license plate content meeting the desensitization requirements as the license plate area coordinates meeting the desensitization requirements.
[0025] Preferably, step S5 specifically includes:
[0026] Step S5-1, for the images in the image sequence, based on the coordinates of the license plate area that meets the desensitization requirements, extract the image of the coordinate area;
[0027] Step S5-2, using a linear interpolation method to reduce the image of the extracted coordinate area by a specified multiple;
[0028] Step S5-3, using the nearest neighbor interpolation method to enlarge the reduced image back to the size of the coordinate area;
[0029] Step S5-4, using the processed image to replace the image in the coordinate area of the original image;
[0030] Step S5-5, returning to step S5-1, processing all the images in the image sequence, and finally obtaining a mosaic-added image sequence as an output desensitized image sequence.
[0031] Preferably, the vehicle detection network is obtained through training, and the training step includes:
[0032] Preparing training data for the vehicle detection network includes:
[0033] (1) Collecting image data containing vehicles, where the image data is obtained from camera capture, image database or network acquisition;
[0034] (2) marking the vehicle area in the image data containing the vehicle, wherein the marking method includes manual marking or automatic marking using an image processing algorithm;
[0035] (3) performing standardization processing on the marked vehicle area, wherein the standardization processing includes adjusting the image size, adjusting the brightness, and adjusting the contrast;
[0036] (4) A vehicle image training dataset is constructed using labeled and standardized vehicle images, and the vehicle image dataset is used to train a vehicle detection model.
[0037] Determining a model configuration of the vehicle detection network, including determining a network structure and setting hyperparameters for training;
[0038] The vehicle detection network is trained 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] Prepare the training data for the license plate detection network, specifically including:
[0041] (1) Collecting image data containing license plates, where the image data comes from camera photography, image databases, or network collection;
[0042] (2) marking the license plate area in the image data containing the license plate, wherein the marking method includes manual marking or automatic marking using an image processing algorithm;
[0043] (3) performing standardization processing on the marked license plate area, wherein the standardization processing includes adjusting the image size, adjusting the brightness, and adjusting the contrast;
[0044] (4) A license plate image training dataset is constructed using labeled and standardized license plate images, and the license plate image dataset is used to train a license plate detection model.
[0045] Determining a model configuration of the license plate detection network, including determining a network structure and setting hyperparameters for training;
[0046] The license plate detection network is trained based on the training data and the model configuration.
[0047] Compared with the prior art, the present invention has at least the following beneficial effects:
[0048] (1) The present invention adopts a step-by-step processing technology of first detecting the vehicle and then detecting the license plate. After the vehicle is detected, the license plate detection only needs to be performed in the vehicle area, which reduces 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; and the license plate detection is limited to a smaller specific area, reducing the interference of background debris and other irrelevant areas, which helps to improve the accuracy of license plate detection.
[0049] (2) The present invention 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 order consistency of the output results and 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, and are suitable for devices with limited computing power. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The drawings are only for the purpose of illustrating particular embodiments and are not to be construed as limiting the invention.
[0051] Figure 1 A flow chart of a license plate desensitization method based on step-by-step detection and parallel technology provided by the present invention.
[0052] Figure 2 This is a schematic diagram of the network composition and interaction of each module provided by the present invention.
[0053] Figure 3 A schematic diagram of the algorithm steps in the test / application phase of the license plate desensitization method using the step-by-step detection and parallel technology provided by the present invention.
[0054] Figure 4 A schematic diagram of the algorithm steps in the training phase of the license plate desensitization method using the step-by-step detection and parallel technology provided by the present invention. DETAILED DESCRIPTION
[0055] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In addition, the present invention can also be implemented in other ways different from those described herein, and therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0056] In order to illustrate the effectiveness of the method proposed by the present invention, the above technical solution of the present invention is described in detail below through a specific embodiment. Figure 1 As shown, 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, performing denoising and enhancement preprocessing on the original image or video collected by the intelligent network-connected vehicle to obtain an image sequence;
[0058] In this step, the input raw data to be detected is the raw image or video collected by the intelligent connected vehicle. First, the type of the input data is judged. If the input data is a video, the video is saved as an image frame by frame and then preprocessed. If the input data is an image, preprocessing is performed directly; the preprocessing process includes resizing, denoising, and enhancing each image, and the processed image is saved as an image sequence.
[0059] In some embodiments, the resizing process may use an interpolation algorithm to scale the image to ensure that all images have the same size, and black or white border padding may be added around the image to maintain the aspect ratio of the image; the denoising process may use Gaussian filtering, median filtering, or mean denoising to reduce image noise; the enhancement process may use histogram equalization, gamma correction, sharpening, and color enhancement to improve the validity of information in the image. The present invention does not limit the specific methods of resizing, denoising, and enhancement.
[0060] Step S2: for the images in the image sequence, a vehicle detection network is used to obtain vehicle region coordinates, and a vehicle region sub-image is obtained by cropping the image based on the vehicle region coordinates.
[0061] In this step, the 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 area coordinates of the vehicle in the image are obtained through forward calculation.
[0062] In some embodiments, the vehicle area coordinates include the coordinates of the upper left corner vertex and the lower right corner vertex of the rectangular box where the vehicle's position area in the image is located, expressed as [x1, y1, x2, y2], where x1, y1 are the horizontal and vertical coordinates of the upper left corner vertex in the image, and x2, y2 are the horizontal and vertical coordinates of the lower right corner vertex in the image.
[0063] Based on the vehicle area coordinates, the image is cropped to obtain the area where the vehicle is located in the image as the vehicle area sub-image.
[0064] Step S3: Use multiple identical license plate detection networks to perform parallel detection on the vehicle area sub-image to obtain the license plate area coordinates.
[0065] In this step, the present invention uses multiple identical license plate detection networks to process the input vehicle region sub-images in parallel. Specifically, a multi-threaded processing method is used to process the cropped vehicle region sub-images in parallel.
[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] Since the scheduling order of parallel processing threads by the operating system is uncertain, the order of the processing results obtained after multi-threaded processing may not match the order of the input image sequence. To address this problem, the present invention provides the above-mentioned image allocation method, which divides the input sequence into batches based on the number of license plate detection networks, and solves the problem through subsequent steps.
[0072] 2) Use multi-threading to process each batch of images.
[0073] In this step, the images of each batch are processed in the order of the batch numbers. For example, after batch B1 is completed, batch B2 is processed, and so on. For the images in each batch, 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 jth image batch, thread A processes the first item I (j -1) ×k+1Processing, thread B processes the second item I (j -1) ×k+2 Processing, thread C processes the third item I (j -1) ×k+k The license plate detection network in each thread obtains the coordinates of the license plate area in each vehicle area sub-image.
[0075] After waiting for all threads to complete processing, the coordinate results of the license plate areas of this batch are summarized, and then the next batch is executed until all batches are completed.
[0076] In this embodiment, the specific process of multi-thread processing is described by example:
[0077] Batch B1: Thread A processes image 1, thread B processes image 2, and thread C processes image 3. Each thread runs in parallel. After each thread has completed 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. After each thread has completed processing, the results of batch B2 are summarized.
[0079] And so on, completing the processing of all batches.
[0080] 3) Summarize the processing results of all batches of images to obtain the coordinates of all license plate areas.
[0081] Through the above method, the present invention controls the order of batches, ensuring that the next batch is processed only after the previous batch is processed. Within each batch, the line program number and the image sequence are bound, thereby ensuring the order of processing both within and outside the batch. Finally, multi-threaded parallel processing is achieved to improve processing efficiency while ensuring the order of processing.
[0082] Step S4: acquiring license plate content based on the license plate area coordinates, performing desensitization requirement judgment on the license plate content, and screening out license plate area coordinates that meet the desensitization requirements.
[0083] In this step, the resolution, minimum illumination and geometric distortion of the license plate can be judged whether they meet the standards according to the requirements of the desensitization standards, and the license plate area coordinates corresponding to the license plate content that meets the standards are determined as the license plate area coordinates that meet the desensitization requirements.
[0084] In some embodiments, the resolution of the license plate may be determined by calculating the pixel width and height of the image and comparing them with the preset minimum pixel width and height. The minimum illumination may be determined by analyzing the brightness histogram of the image to determine whether the average brightness value of the image is higher than a preset threshold. The geometric distortion may be determined by using an edge detection algorithm to analyze the straightness and proportional relationship of the license plate edge to determine whether there is obvious geometric deformation in the license plate area.
[0085] Step S5: Based on the license plate area coordinates that meet the desensitization requirements, mosaic processing is performed on the image sequence, and the desensitized image sequence is output. The processing process is specifically as follows:
[0086] 1) For the images in the image sequence, based on the coordinates of the license plate area that meets the desensitization requirements, extract the image of the coordinate area.
[0087] In some embodiments, the coordinates of the license plate area that meet the desensitization requirements may include the coordinates of the upper left corner vertex of the rectangular box of the license plate area that meets the desensitization requirements and the width and height of the rectangular box, expressed as [x, y, w, h], where x and y are the horizontal and vertical coordinates of the upper left corner vertex in the image, and w and h are the width and height of the rectangular box, respectively.
[0088] 2) Use linear interpolation to reduce the image of the extracted coordinate area by a specified multiple.
[0089] In some embodiments, the cv2 module of Python language can be used to implement the specified reduction of the image area, 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) Use nearest neighbor interpolation to enlarge the reduced image back to the size of the coordinate area.
[0092] In some embodiments, the cv2 module of Python language can be used to implement image magnification, and the corresponding code is:
[0093] roi=cv2.resize(roi,(w,h),interpolation=cv2.INTER_NEAREST)
[0094] 4) Using the processed image to replace the image in the coordinate area of the original image;
[0095] 5) Processing all images in the image sequence, and finally obtaining a mosaic-added image sequence as an output desensitized image sequence.
[0096] In some embodiments, the above method of the present invention can be implemented in Python language, using a modular program structure, and realizing the detection and desensitization of the license plate in the input image by combining different functional modules. In order to ensure the modularity and data interaction of the system, this system makes the following provisions for the construction of each functional component: All program modules exchange data through standard interfaces, and each program module realizes the functions of vehicle area clipping, license plate desensitization requirement judgment, coordinate calculation and data desensitization. The program modules are respectively:
[0097] 1) Input module: receives video stream or image as input and obtains frame sequence.
[0098] 2) Vehicle detection module: Use the trained YOLOv8 network to detect vehicles and mark the coordinate position of the vehicle in each frame.
[0099] 3) Vehicle strategy module: Crop and record the coordinates of the detected vehicles to obtain vehicle images and vehicle area coordinates.
[0100] 4) License plate detection module: Use three trained YOLOv8 networks to perform parallel detection of license plates in the vehicle area and obtain the coordinates of the license plates in the vehicle image.
[0101] 5) License plate strategy module: Desensitize the detected license plate area and record the coordinates if it meets the requirements, otherwise the coordinates will be discarded.
[0102] 6) Coordinate calculation module: The coordinates of the license plate area in the original image are calculated through the vehicle area coordinates and the license plate area coordinates that meet the desensitization requirements.
[0103] 7) Data desensitization module: Use the mosaic method to desensitize the license plate area in the original image that meets the desensitization requirements.
[0104] 8) Main module: Integrate the above modules to output the desensitized image / video frame.
[0105] The present invention provides a pseudo code of a license plate desensitization method, as shown in Table 1:
[0106] Table 1
[0107]
[0108] The present invention also discloses a training method for the vehicle detection network and the license plate detection network, comprising the following steps:
[0109] Preparing training data for the vehicle detection network and the license plate detection network includes collecting image data, annotating image data, normalizing annotated regions, and constructing a training data set.
[0110] 1) Collect, organize and sort a large amount of image data related to vehicles and license plates. These image data can come from various sources, such as cameras, image databases or the Internet.
[0111] 2) Label the vehicle and license plate areas, that is, mark the vehicle and license plate areas in the image. This can be achieved through manual labeling or automatic labeling using image processing algorithms.
[0112] 3) The labeled vehicles and license plate areas are standardized to meet the input requirements of the network model. This includes operations such as resizing the image, adjusting brightness and contrast, etc. to ensure the consistency and trainability of the input data.
[0113] 4) Construct two training datasets of vehicle images and license plate images. The labeled and standardized vehicle images and license plate images are constructed into two independent datasets. The vehicle image dataset is used to train the vehicle detection model, while the license plate image dataset 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 structures of the vehicle detection network and the license plate detection network include an input layer, multiple convolutional layers, multiple pooling layers, and a fully connected layer. The input layer is set to an appropriate size according to the size of the input image; the convolutional layer uses multiple convolutional layers to extract image features. Different convolution kernel sizes and numbers can be selected according to requirements; the pooling layer uses a pooling layer after the convolutional layer to downsample and reduce the size of the feature map; the combination of multiple convolutional and pooling layers can be repeated as needed 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 to generate the final prediction result.
[0116] In some embodiments, the network structure of the vehicle detection network and the license plate detection network may adopt a YOLOv8 network, and the present invention does not limit the specific target detection network adopted.
[0117] 2) Set the hyperparameters of training. In this step, set the hyperparameters of the vehicle detection network and the license plate detection network. The hyperparameters may include: learning rate, batch size, number of iterations, activation function and loss function. Among them, the learning rate refers to the speed used to control parameter updates; the batch size is used to define the number of samples used in each training; the number of iterations is the number of training iterations of the network; an appropriate activation function can be selected, such as ReLU, LeakyReLU, etc.; a loss function suitable for the target task can be used, such as cross entropy loss, mean square error loss, etc.
[0118] The vehicle detection network and the license plate detection network are trained based on the training data and the 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 enhancement techniques, such as random cropping, rotation, translation, and other operations, to increase the diversity and quantity of data and improve the generalization ability of the model.
[0121] 3) Divide the dataset into training set and validation set. Divide the dataset into training set and validation set for model evaluation and adjustment during the training process. Usually, 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 perform hyperparameter tuning.
[0122] 4) Perform model training and optimization. Use the image data in the training set as input to update the network weights and parameters 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 model parameters according to the gradient of the loss function to gradually optimize the performance of the model.
[0123] 5) Verify model performance. Use the image data in the validation set to input the trained model, calculate the model's prediction results, and compare them with the labels. Evaluate the performance of the model based on evaluation indicators (such as accuracy, recall, etc.), and adjust the model and tune parameters as needed.
[0124] 6) Repeat the training and validation 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 validation until the model reaches the expected performance level. By gradually iteratively training and adjusting the model, it can achieve high accuracy and robustness in vehicle and license plate detection tasks.
[0125] The present invention is a license plate method based on step-by-step detection and parallel technology. It adopts step-by-step processing and parallel technology of multiple single-target detection networks to achieve the application requirements of high accuracy, real-time and sequentiality of license plate desensitization under limited computing power constraints, and effectively solves the application conflict problem between computing power consumption and target detection.
[0126] Although the specific embodiments of the present invention depict various actions or steps in a specific order, this 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 obtain the desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination. The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or replacements that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
[0127] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A license plate desensitization method based on step-by-step detection and parallel technology, It is characterized in that The following steps are involved: Step S1, performing resizing, denoising, and image enhancement preprocessing on the original image or video data collected by the intelligent network-connected vehicle to obtain an image sequence; Step S2: for an image in the image sequence, using a vehicle detection network to obtain vehicle region coordinates, and cropping the image based on the vehicle region coordinates to obtain a vehicle region sub-image; Step S3, using multiple identical license plate detection networks to perform multi-threaded parallel detection on the vehicle area sub-image to obtain the license plate area coordinates; Step S3 specifically includes: Step S3-1, determining the number of license plate detection networks, and evenly dividing the vehicle region sub-images into multiple batches, wherein the number of vehicle region sub-images in each batch is the same as the number of license plate detection networks; Step S3-2: for a batch of vehicle area sub-images, create multiple threads, one for each vehicle area sub-image, each thread uses a license plate detection network to perform license plate detection, and after each thread has completed processing, summarize the coordinate results of the license plate area of this batch; Step S3-3, return to step S3-2, and process the images of each batch according to the order of the batch numbers until all batches are processed; Step S3-4, summarizing the processing results of all batches of images to obtain the coordinates of all license plate areas; Step S4, obtaining license plate content based on the license plate area coordinates, performing desensitization requirements on the license plate content, and screening out license plate area coordinates that meet the desensitization requirements; Step S5, based on the license plate area coordinates that meet the desensitization requirements, mosaic processing is performed on the image sequence, and the desensitized image sequence is output; Step S5 specifically includes: Step S5-1, for the images in the image sequence, based on the coordinates of the license plate area that meets the desensitization requirements, extract the image of the coordinate area; Step S5-2, using a linear interpolation method to reduce the image of the extracted coordinate area by a specified multiple; Step S5-3, using the nearest neighbor interpolation method to enlarge the reduced image back to the size of the coordinate area; Step S5-4, using the processed image to replace the image in the coordinate area of the original image; Step S5-5, returning to step S5-1, processing all the images in the image sequence, and finally obtaining a mosaic-added image sequence as an output desensitized image sequence.
2. According to claim 1, the license plate desensitization method based on step-by-step detection and parallel technology, It is characterized in that Step S1 specifically includes: The type of the original image or video data is judged. If the input data is a video, the video is saved frame by frame as an image and then preprocessed. If the input data is an image, preprocessing is performed directly. The preprocessing process includes resizing, denoising and image enhancement of each image, and the processed images are saved as the image sequence.
3. The license plate desensitization method based on step-by-step detection and parallel technology according to claim 2, It is characterized in that Step S3-1 specifically includes: The input vehicle region subgraph is represented as a sequence: {I 1 ,I 2 ,I 3 ,I 4 ,...,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: B j ={I (j-1)×k+1 ,I (j-1)×k+2 ,...,I j×k+k } Among them, B j represents the j-th image batch, j is the batch number, and k is the number of license plate detection networks.
4. The license plate desensitization method based on step-by-step detection and parallel technology according to claim 3, It is characterized in that Step S3-2 specifically includes: Create a thread {T 1 ,T 2 ,...,T k }, where k is the number of license plate detection networks. In each batch, thread T 1 to I (j-1)×k+1 Processing, thread T 2 to I (j-1)×k+2 Processing, and so on, until thread T k to I (j-1)×k+k Processing; the license plate detection network in each thread obtains the coordinates of the license plate area in each vehicle area sub-map, and after waiting for each thread to complete the processing, summarizes the coordinate results of the license plate area of this batch.
5. The license plate desensitization method based on step-by-step detection and parallel technology according to claim 4, It is characterized in that Step S4 specifically includes: Determine whether the resolution, minimum illumination, and geometric distortion of the license plate content meet the requirements, and determine the license plate area coordinates corresponding to the license plate content that meets the desensitization requirements as the license plate area coordinates that meet the desensitization requirements.
6. The license plate desensitization method based on step-by-step detection and parallel technology according to any one of claims 1 to 5, It is characterized in that The vehicle detection network is obtained through training, and the training steps include: Preparing training data for the vehicle detection network includes: (1) Collecting image data containing vehicles, where the image data is obtained from camera capture, image database or network acquisition; (2) marking the vehicle area in the image data containing the vehicle, wherein the marking method includes manual marking or automatic marking using an image processing algorithm; (3) performing standardization processing on the marked vehicle area, wherein the standardization processing includes adjusting the image size, adjusting the brightness, and adjusting the contrast; (4) A vehicle image training dataset is constructed using labeled and standardized vehicle images, and the vehicle image dataset is used to train a vehicle detection model. Determining a model configuration of the vehicle detection network, including determining a network structure and setting hyperparameters for training; The vehicle detection network is trained based on the training data and the model configuration.
7. The license plate desensitization method based on step-by-step detection and parallel technology according to any one of claims 1-5, It is characterized in that The license plate detection network is obtained through training, and the training steps include: Prepare the training data for the license plate detection network, specifically including: (1) Collecting image data containing license plates, where the image data comes from camera photography, image databases, or network collection; (2) marking the license plate area in the image data containing the license plate, wherein the marking method includes manual marking or automatic marking using an image processing algorithm; (3) performing standardization processing on the marked license plate area, wherein the standardization processing includes adjusting the image size, adjusting the brightness, and adjusting the contrast; (4) A license plate image training dataset is constructed using labeled and standardized license plate images, and the license plate image dataset is used to train a license plate detection model. Determining a model configuration of the license plate detection network, including determining a network structure and setting hyperparameters for training; The license plate detection network is trained 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
End-To-End Lightweight Method And Apparatus For License Plate Recognition
US20190095730A1
Object detection in image stream processing using optical flow with dynamic regions of interest
US20230237671A1
Cited By
Image processing method and apparatus, electronic device and storage medium
WO2026200724A1
