Data set generation method and system for model training and computer equipment
By generating the initial data set for initial training, and using the client's recognition request and verification results to generate the second data set for secondary training, the problem of low accuracy of the VIN code recognition model is solved, and the accuracy and stability of the recognition are improved.
Patent Information
- Application Number
- CN202311376086.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-04-25
AI Technical Summary
The existing VIN code recognition model has low accuracy during the identification process, mainly because the data set is not accurate enough, resulting in deviations in the model during identification.
By generating the initial data set according to the preset VIN generation rules, the VIN recognition model is initially trained; obtaining the client's VIN recognition request, marking the recognition box and identifying the VIN code string; verifying the recognition results to obtain the correct VIN code string; determining the pixel points of non-VIN code graphic based on the correct VIN code string and the recognition box, and marking these graphics; generating the second data set based on the marked recognition box, and conducting secondary training of the VIN recognition model.
The accuracy of VIN code string recognition is improved, the recognition deviation caused by inaccurate data sets is avoided, and the occurrence of non-VIN code graphics being misidentified as characters is reduced.
Smart Images

Figure CN119888756A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data set generation, and in particular to a method, system, and computer device for generating a data set for model training. Background Art
[0002] The Vehicle Identification Number (VIN) is the ID number of the car. It is determined according to the national vehicle management standards and contains information such as the vehicle's manufacturer, year, model, body type and code, engine code, and assembly location. The new driving license usually prints the VIN code in the "Vehicle Frame Number" column.
[0003] The current OCR products have a very low accuracy rate in the process of recognizing the VIN code string using the VIN recognition model. The main reason is that the data set is not accurate enough, resulting in deviations in the trained model during recognition. The specific reasons are as follows:
[0004] Reason 1: In the process of identifying the code string, the VIN recognition model based on deep learning has an equal probability of identifying each character as a specific character. For example, assuming that ai represents the character recognized at the i-th position, there are a i ∈C, i = {1,2,3…15,16,17}; then the VIN code string is represented by S 17 ={a 1 ,a 2 ,a 3 ……a 16 ,a 17}. Since ai∈C and ai+1∈C, the data set is not differentiated when training the VIN recognition model, resulting in the same probability for ai and ai+1 to recognize specific characters. However, the probability of a certain type of character being recognized at a specific position in a real VIN code string is not equal. For example, the probability of recognizing the production date as a number is higher than the probability of recognizing it as a letter. Therefore, the traditional method of training models with sample training sets is difficult to apply to the high-accuracy recognition of VIN recognition models.
[0005] Reason 2: The training dataset C contains the letters I, Q, and O, but the VIN code string does not. The real VIN code string does not contain the letters I, Q, and O, but the dataset C used by the VIN recognition model does. This results in the number 0 being often mistakenly recognized as the letter Q or O, and the number 1 being mistakenly recognized as the letter I during the VIN code string recognition process.
[0006] Reason 3: Data set C does not contain graphics. When recognizing the VIN code, the graphics close to the code string will be recognized as characters. When recognizing the VIN code string, the graphics close to the code string will be recognized as letters or numbers, resulting in the recognition output result exceeding 17 digits (such as Figure 1 As shown, the “☆” pattern before the letter “L” will be mistakenly recognized as the letter). Summary of the invention
[0007] In view of this, an object of an embodiment of the present invention is to improve the accuracy of VIN code string recognition, which requires a correct data set and uses the data set to optimize the training of the VIN recognition model.
[0008] A first aspect of the present invention provides a method for generating a data set for model training, the method comprising:
[0009] Generate a first data set according to a preset vehicle identification code (VIN) generation rule; perform initial training on a VIN recognition model according to the first data set;
[0010] Obtain the vehicle identification code (VIN) recognition request sent by the client; mark the recognition box on the image to be recognized based on the VIN recognition model and recognize the VIN code string;
[0011] Perform verification processing on the VIN code string, obtain the correct VIN code string, and return the verification result to the client;
[0012] Determine the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and mark the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic;
[0013] A second data set is generated according to the recognition frame with the non-VIN code graphic marked; and the VIN recognition model is trained again according to the second data set.
[0014] Preferably, the VIN recognition model is a DBNet text detection deep learning model;
[0015] The step of generating a first data set according to a preset vehicle identification code (VIN) generation rule includes:
[0016] A vehicle identification code VIN is randomly generated; the vehicle identification code VIN includes a set of 10 digits from 0 to 9 and a set of 26 letters from A to Z;
[0017] A first data set is formed based on a number of vehicle identification codes VIN formed by random combination of the number set and the letter set.
[0018] Preferably, performing verification processing on the VIN code string, obtaining a correct VIN code string, and returning the verification result to the client includes: performing verification processing according to the number of character digits of the VIN code string;
[0019] Performing verification processing according to the number of digits of the VIN code string includes:
[0020] If the VIN code string is less than 17 characters, no verification is performed and the VIN code string is returned to the client, who manually identifies or fills in the correct VIN code;
[0021] If the VIN code string is equal to 17 characters, when the verification fails after passing through the VIN code verification algorithm, it will be directly returned to the client, and the client will manually identify or fill in the correct VIN code string; when the verification is correct after passing through the VIN code verification algorithm, the correct VIN code string will be saved in the information storage system, and then the correct VIN code string will be returned to the client.
[0022] Preferably, performing verification processing according to the number of digits of the VIN code string further includes:
[0023] If the VIN code string is greater than 17 characters, then this VIN code string is recorded as S vin , intercept S vin The 17-bit string is denoted as S 17 ;
[0024] Take S 17 For S vin When the 17-digit character string is intercepted from the first digit, if the verification is successful, the VIN code string information is saved in the information storage system and the verified VIN code string information is returned to the client after the verification algorithm is exited;
[0025] If the verification fails, then take S 17 For S vin The 17-digit string intercepted from the second digit, if the verification is successful at this time, save the VIN code string information to the information storage system and return the verified VIN code string information to the client after exiting the verification algorithm; if the verification fails at this time, directly return S vin It is returned to the client and then manually identified.
[0026] Preferably, before performing verification processing on the VIN code string, the method further comprises: saving the identification frame marked on the to-be-identified picture and the identified VIN code string to an information storage system;
[0027] The VIN code string is verified to obtain a correct VIN code string, and the verification result is returned to the client, and also includes: if it is found that the VIN code string returned to the client is wrong, the client executes a correction of the VIN code string, and updates the corrected VIN code string to the information storage system.
[0028] Preferably, determining the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and marking the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic, comprises:
[0029] Obtain the recognition frame saved after the VIN recognition model recognizes, and record the set of pixels of the recognition frame as M;
[0030] Get the correct VIN code string, find the position of the correct VIN code string in the recognition frame and mark it, and record the set of pixel points corresponding to the marked correct VIN code string as N;
[0031] The pixels in set N are removed from set M to generate a set consisting of non-VIN code graphic pixels.
[0032] In addition, a second aspect of the present invention provides a device for generating a data set for model training, the device comprising a first generation module, a recognition module, a verification module, a marking module, and a second generation module; wherein:
[0033] A first generating module is used to generate a first data set according to a preset vehicle identification code (VIN) generating rule; and to perform initial training on a VIN recognition model according to the first data set;
[0034] The recognition module is used to obtain the vehicle identification code (VIN) recognition request sent by the client; mark the recognition box on the image to be recognized based on the VIN recognition model and recognize the VIN code string;
[0035] A verification module, used to perform verification processing on the VIN code string, obtain a correct VIN code string, and return the verification result to the client;
[0036] a marking module, used to determine the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and mark the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic;
[0037] The second generating module is used to generate a second data set according to the identification frame with the non-VIN code graphic marked; and perform secondary training on the VIN recognition model according to the second data set.
[0038] Preferably, the marking module is further used to: obtain the recognition frame saved after the VIN recognition model is recognized, and record the set of pixel points of this recognition frame as M; obtain the correct VIN code string, find the position of the correct VIN code string in the recognition frame and mark it, and record the set of pixel points corresponding to the marked correct VIN code string as N; remove the pixel points in the set N from the set M to generate a set of non-VIN code graphic pixel points.
[0039] In addition, the third aspect of the present invention provides a computer device, which includes: one or more processors, and a memory, wherein the memory is used to store one or more computer programs; characterized in that the computer program is configured to be executed by the one or more processors, and the program includes steps for executing the method for generating a data set for model training as described above.
[0040] In addition, the fourth aspect of the present invention provides a storage medium, which stores a computer program; the program is loaded and executed by a processor to implement the steps of the method for generating a data set for model training as described above.
[0041] In the scheme of the present invention, a first data set is generated according to a preset vehicle identification code VIN generation rule; the VIN recognition model is initially trained according to the first data set; a vehicle identification code VIN recognition request sent by a client is obtained; an identification frame is marked on the image to be identified based on the VIN recognition model and the VIN code string is identified; a verification process is performed on the VIN code string to obtain a correct VIN code string, and the verification result is returned to the client; non-VIN code graphic pixels are determined according to the identification frame and the correct VIN code string, and the non-VIN code graphic is marked in the identification frame according to the non-VIN code graphic pixels; a second data set is generated according to the identification frame with the marked non-VIN code graphic; and the VIN recognition model is retrained according to the second data set. On the one hand, a first data set is generated through VIN code rules, and this first data set is used to train the VIN recognition model to avoid recognition bias caused by unequal probabilities of needing to recognize a certain type of character at a specific position in the real code string, and often misrecognizing numbers and letters during the VIN code string recognition process; on the other hand, VIN code string information is collected through the recognition process, and then non-VIN code graphics are automatically labeled, and a second data set is generated based on the non-VIN code graphic data. This second data set is used to train the VIN recognition model not to recognize non-VIN code graphics, thereby avoiding recognizing graphics close to the code string as characters. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0043] Figure 1 is a schematic diagram of a non-VIN code graphic of the prior art of an embodiment of the present invention;
[0044] Figure 2 It is a flowchart of a method for generating a data set for model training disclosed in an embodiment of the present invention;
[0045] Figure 3 It is a schematic diagram of the digital value corresponding to each character of the VIN code disclosed in the embodiment of the present invention;
[0046] Figure 4 It is a schematic diagram of weighted values corresponding to the 1st to 17th digits of the VIN code disclosed in the embodiment of the present invention;
[0047] Figure 5 It is a diagram of the overall architecture of the system disclosed in the embodiment of the present invention;
[0048] Figure 6 is a flowchart of the entire system scheduling disclosed in an embodiment of the present invention;
[0049] Figure 7 It is a schematic diagram of the structure of a data set generating device for model training disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0051] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0053] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0054] It should be noted that the “plurality” mentioned in this article refers to two or more.
[0055] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0056] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of a method for generating a data set for model training disclosed in an embodiment of the present invention. Figure 2 As shown, a method for generating a data set for model training according to an embodiment of the present invention includes:
[0057] S201, generating a first data set according to a preset vehicle identification code (VIN) generation rule; performing initial training on a VIN recognition model according to the first data set;
[0058] Specifically, in this embodiment, the VIN code string is a sequence of 17 characters, which is used to identify a car and is also commonly referred to as a Vehicle Identification Number.
[0059] The VIN code string usually contains the manufacturer code, vehicle type, year, month, date, and check code. Manufacturer code: The first two letters of the vehicle manufacturer's abbreviation, used to identify the vehicle manufacturer; Vehicle type: Description of the vehicle type, such as sedan, truck, SUV, etc.; Year: The year the vehicle was manufactured; Month: The month the vehicle was manufactured; Date: The date the vehicle was manufactured; Check code: Used to verify whether the VIN code is correct, usually an additional character. The VIN code can be found in multiple places, including above the vehicle's front windshield, frame, hood, door edge, etc., and can also be found on relevant documents such as vehicle registration certificates, insurance policies, and driving licenses.
[0060] In this embodiment, the VIN recognition model uses the DBNet text detection deep learning model. The data set uses a number set (10 numbers from 0 to 9) and a letter set (26 letters from A to Z).
[0061] The S201 generates a first data set according to a preset vehicle identification code VIN generation rule, including: randomly generating a vehicle identification code VIN; the vehicle identification code VIN includes a digital set of 10 numbers from 0 to 9 and a letter set of 26 letters from A to Z; and forming a first data set based on a plurality of vehicle identification codes VIN randomly combined based on the digital set and the letter set.
[0062] The data set used by the VIN recognition model is set C. The set of 10 digits from 0 to 9 is set A; the set of 26 letters from A to Z is set B. Therefore, we have:
[0063] {x|0,1,2,3,...8,9}=A; {x|A,B,C...X,Y,Z}=B; AUB=C.
[0064] S202, obtaining a vehicle identification code (VIN) recognition request sent by the client; marking a recognition frame on the image to be recognized based on the VIN recognition model and recognizing the VIN code string;
[0065] Specifically, in this embodiment, the client sends a recognition request to the OCR system; the VIN recognition model in the OCR system will mark the recognition box on the image to be recognized and recognize the VIN code string; the recognition box information and the recognized VIN code string information marked in the previous step will be saved in the information storage system.
[0066] At this time, the VIN code string will appear in the following three situations: the VIN code string is less than 17 characters; the VIN code string is equal to 17 characters; the VIN code string is greater than 17 characters.
[0067] S203, performing verification processing on the VIN code string, obtaining a correct VIN code string, and returning the verification result to the client;
[0068] Specifically, this embodiment performs verification processing according to the number of character bits of the VIN code string. The verification processing according to the number of bits of the VIN code string includes:
[0069] If the VIN code string is less than 17 characters, no verification process will be performed and the VIN code string will be returned to the client, who will manually identify or fill in the correct VIN code. In this case, when the VIN code string less than 17 characters is transmitted to the VIN code verification algorithm, it will be directly returned to the client, who will manually identify or fill in the correct VIN code.
[0070] If the VIN code string is equal to 17 characters, when the verification fails after passing through the VIN code verification algorithm, it will be directly returned to the client, and the client will manually identify or fill in the correct VIN code string; when the verification is correct after passing through the VIN code verification algorithm, the correct VIN code string will be saved in the information storage system, and then the correct VIN code string will be returned to the client.
[0071] If the VIN code string is greater than 17 characters, then this VIN code string is recorded as S vin , intercept S vin The 17-bit string is denoted as S 17 ; Take S 17 For S vin When the 17-digit string is intercepted from the first digit, if the verification is successful, the VIN code string information is saved in the information storage system and the verification algorithm is exited and the verified VIN code string information is returned to the client; if the verification fails, then S 17 For S vin The 17-digit string intercepted from the second digit, if the verification is successful at this time, save the VIN code string information to the information storage system and return the verified VIN code string information to the client after exiting the verification algorithm; if the verification fails at this time, directly return S vin It is returned to the client and then manually identified.
[0072] It should be noted that the VIN code verification algorithm of this embodiment can use the 9th check bit of the VIN string to verify the VIN code string.
[0073] like Figure 3 The figure shows a schematic diagram of the digital values corresponding to each character of the VIN code of this embodiment; among which, the digital value corresponding to the character "0" is 0; the digital value corresponding to the character "1" is 1...; the digital value corresponding to the character "A" is 1, the digital value corresponding to the character "B" is 2, ... and the digital value corresponding to the character "Z" is 9. Figure 4 The following is a schematic diagram of the weighted values corresponding to the 1st to 17th digits of the VIN code in this example. The weighted value of the 1st digit is 8, the weighted value of the 2nd digit is 7, and so on. The weighted value of the 16th digit is 3, and the weighted value of the 17th digit is 2.
[0074] Verification method:
[0075] The VIN code starts from the first digit, the code value is multiplied by the weighted value of the digit, and the product value of all 17 digits is calculated, added and divided by 11. The remainder is the check value of the 9th digit.
[0076] Example: The ninth digit of UU3JA63691D713820 is the check code, then according to Figure 3-4 , the digital value and weight corresponding to the VIN code are:
[0077] VIN Number U U 3 J A 6 3 6 1 1 D 7 1 3 8 2 0 Numeric Value 4 4 3 1 1 6 3 6 1 1 4 7 1 3 8 2 0 Weight 8 7 6 5 4 3 2 10 0 9 8 7 6 5 4 3 2
[0078] The weighted values are calculated as follows:
[0079] 4*8+4*7+3*6+1*5+1*4+6*3+3*2+6*10+1*0+1*9+4*8+7*7+1*6+3*5+8*4+2*3+0*2=320; 320 divided by 11 is 29, with a remainder of 1. The remainder 1 is the check code. If it is the same as the ninth bit in the code string, the check is correct, otherwise it is an error.
[0080] Preferably, before performing verification processing on the VIN code string at S203, the method further comprises: saving the identification frame marked on the image to be identified and the identified VIN code string to an information storage system;
[0081] Further, after the verification is completed, the VIN code string (including correct or incorrect conditions) is returned to the client. If the user finds that the VIN code string returned to the client is incorrect, the client executes a correction of the VIN code string and updates the corrected VIN code string to the information storage system.
[0082] S204, determining the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and marking the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic;
[0083] S205, generating a second data set according to the recognition frame having the non-VIN code graphic marked thereon; and performing secondary training on the VIN recognition model according to the second data set.
[0084] Preferably, S204, determining the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and marking the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic, comprises:
[0085] Obtain the recognition frame saved after the VIN recognition model recognizes, and record the set of pixels of the recognition frame as M;
[0086] Get the correct VIN code string, find the position of the correct VIN code string in the recognition frame and mark it, and record the set of pixel points corresponding to the marked correct VIN code string as N;
[0087] The pixels in set N are removed from set M to generate a set consisting of non-VIN code graphic pixels.
[0088] In this embodiment, since the first data set used in the training of the VIN recognition model is set C, but set C does not contain a data set of non-VIN code graphics, the VIN recognition model trained based on the first data set will mistakenly recognize the graphics as characters during the recognition process. Therefore, it is necessary to add a second data set containing non-VIN code graphics to the training data set, and continue to train the VIN recognition model with the second data set, so that the VIN recognition model can exclude non-VIN code graphics, thereby improving the recognition accuracy of the VIN recognition model.
[0089] Specifically, in this embodiment, after the VIN recognition model recognizes the VIN code, the marked recognition frame information will be saved in the information storage system, and the correct VIN code string information will be obtained after the VIN code verification algorithm or after manual identification by the client. Therefore, the process of automatically marking non-VIN code graphics is as follows:
[0090] Obtain the identification frame information saved after the VIN recognition model recognizes it (the set of pixels in this identification frame is denoted as M); then obtain the correct VIN code string information, use deep learning image recognition technology to find the position of the correct VIN code string in the identification frame and mark it (the set of pixels in this identification frame is denoted as N); the set of pixel points in the graphic (denoted as Z) is equal to the elements in set N removed from set M; convert this set Z into an image, and use deep learning image recognition technology to mark the graphic in the identification frame; finally, convert this identification frame with the marked graphic into a second data set.
[0091] Finally, the VIN recognition model is trained again based on the second data set to obtain a final VIN recognition model.
[0092] Further, if Figure 5 As shown, it is the overall architecture diagram of this embodiment; it can be seen from the architecture diagram that the entire system is divided into three parts, the client, the OCR system and the information storage system, wherein the OCR system includes a general model (ie, a VIN recognition model) and a VIN code verification algorithm.
[0093] like Figure 6 The flowchart of the whole system scheduling of this embodiment is shown as follows: (1) The client sends a recognition request to the OCR system; (2) The general model (i.e., the VIN recognition model) in the OCR system will mark the recognition box on the image to be recognized and recognize the VIN code string; (3) The recognition box information and the recognized VIN code string information marked in the previous step (2) will be saved in the information storage system; (4) The VIN code string will be analyzed and the following three situations will be verified; (5) The VIN code string returned to the client, if the user finds that the VIN code string is wrong, the VIN code string will be corrected, and the corrected VIN code string will be saved in the information storage system.
[0094] In addition, a second aspect of this embodiment provides a device for generating a data set for model training, such as Figure 7 As shown, the device includes a first generating module 701, an identifying module 702, a verifying module 703, a marking module 704, and a second generating module 705; wherein:
[0095] The first generating module 701 is used to generate a first data set according to a preset vehicle identification code VIN generating rule; and perform initial training on a VIN recognition model according to the first data set;
[0096] The identification module 702 is used to obtain the vehicle identification code (VIN) identification request sent by the client; mark the identification box on the image to be identified based on the VIN identification model and identify the VIN code string;
[0097] Verification module 703, used to perform verification processing on the VIN code string, obtain the correct VIN code string, and return the verification result to the client;
[0098] A marking module 704 is used to determine the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and mark the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic;
[0099] The second generating module 705 is used to generate a second data set according to the recognition frame with the non-VIN code graphic marked thereon; and perform secondary training on the VIN recognition model according to the second data set.
[0100] The marking module 704 is further used to: obtain the recognition frame saved after the VIN recognition model recognizes, and record the set of pixels of the recognition frame as M; obtain the correct VIN code string, find the position of the correct VIN code string in the recognition frame and mark it, and record the set of pixels corresponding to the marked correct VIN code string as N; remove the pixels in the set N from the set M to generate a set of pixels of non-VIN code graphics.
[0101] Preferably, the VIN recognition model is a DBNet text detection deep learning model;
[0102] The first generation module 701 is also used to randomly generate a vehicle identification code VIN; the vehicle identification code VIN includes a digital set of 10 numbers from 0 to 9 and a letter set of 26 letters from A to Z; a plurality of vehicle identification codes VIN randomly combined based on the digital set and the letter set form a first data set.
[0103] The verification module 703 is further used to perform verification processing according to the number of character bits of the VIN code string;
[0104] The verification process is performed according to the number of digits of the VIN code string, including:
[0105] If the VIN code string is less than 17 characters, no verification is performed and the VIN code string is returned to the client, who manually identifies or fills in the correct VIN code;
[0106] If the VIN code string is equal to 17 characters, when the verification fails after passing through the VIN code verification algorithm, it will be directly returned to the client, and the client will manually identify or fill in the correct VIN code string; when the verification is correct after passing through the VIN code verification algorithm, the correct VIN code string will be saved in the information storage system, and then the correct VIN code string will be returned to the client.
[0107] If the VIN code string is longer than 17 characters, then the VIN code string is recorded as Svin, and the 17-character string of Svin is recorded as Svin. 17 ;
[0108] Take S 17 When the VIN is a 17-digit string intercepted from the first digit of Svin, if the verification is successful, the VIN code string information is saved in the information storage system and the verified VIN code string information is returned to the client after the verification algorithm is exited;
[0109] If the verification fails, then take S 17 It is a 17-digit character string intercepted from the second digit of Svin. If the verification is successful at this time, the VIN code string information is saved in the information storage system and the verification algorithm is exited and the verified VIN code string information is returned to the client; if the verification fails at this time, Svin is directly returned to the client for manual identification.
[0110] Preferably, the VIN code string is verified, and the identification box marked on the image to be identified and the identified VIN code string are saved to an information storage system; if the VIN code string returned to the client is found to be wrong, the client corrects the VIN code string and updates the corrected VIN code string to the information storage system.
[0111] In addition, an embodiment of the present application also discloses a computer device, which includes: one or more processors, and a memory, wherein the memory is used to store one or more computer programs; characterized in that the computer program is configured to be executed by the one or more processors, and the program includes steps for executing the method for generating a data set for model training as described above.
[0112] In addition, an embodiment of the present application further provides a storage medium storing a computer program; the program is loaded and executed by a processor to implement the steps of the method for generating a data set for model training as described above.
[0113] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0114] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0115] The units described as separate components may or may not be physically separated. As a unit, it can be appreciated by those skilled in the art that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0116] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a grid device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0118] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for generating a data set for model training, characterized in that: The method comprises: Generate a first data set according to a preset vehicle identification code (VIN) generation rule; perform initial training on a VIN recognition model according to the first data set; Obtain the vehicle identification code (VIN) recognition request sent by the client; mark the recognition box on the image to be recognized based on the VIN recognition model and recognize the VIN code string; Perform verification processing on the VIN code string, obtain the correct VIN code string, and return the verification result to the client; Determine the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and mark the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic; A second data set is generated according to the recognition frame with the non-VIN code graphic marked; and the VIN recognition model is trained again according to the second data set.
2. The method for generating a data set for model training according to claim 1, characterized in that: The VIN recognition model is based on the DBNet text detection deep learning model; The step of generating a first data set according to a preset vehicle identification code (VIN) generation rule includes: A vehicle identification number (VIN) is randomly generated; the vehicle identification number (VIN) includes a 10-digit number set from 0 to 9 and a 26-letter letter set from A to Z; A first data set is formed based on a number of vehicle identification codes VIN formed by random combination of the number set and the letter set.
3. The method for generating a data set for model training according to claim 2, characterized in that: The performing of verification processing on the VIN code string to obtain a correct VIN code string and returning the verification result to the client includes: performing verification processing according to the number of character digits of the VIN code string; Performing verification processing according to the number of character bits of the VIN code string includes: If the VIN code string is less than 17 characters, no verification is performed and the VIN code string is returned to the client, who manually identifies or fills in the correct VIN code; If the VIN code string is equal to 17 characters, when the verification fails after passing through the VIN code verification algorithm, it will be directly returned to the client, who will manually identify or fill in the correct VIN code string; when the verification is correct after passing through the VIN code verification algorithm, the correct VIN code string will be saved in the information storage system, and then the correct VIN code string will be returned to the client.
4. The method for generating a data set for model training according to claim 3, characterized in that: Performing verification processing according to the number of character digits of the VIN code string also includes: If the VIN code string is greater than 17 characters, then this VIN code string is recorded as S vin , intercept S vin The 17-bit string is denoted as S 17 ; Take S 17 For S vin When the 17-digit character string is intercepted from the first digit, if the verification is successful, the VIN code string information is saved in the information storage system and the verification algorithm is exited and the verified VIN code string information is returned to the client; If the verification fails, then take S 17 For S vin The 17-digit string intercepted from the second digit, if the verification is successful at this time, save the VIN code string information to the information storage system and return the verified VIN code string information to the client after exiting the verification algorithm; if the verification fails at this time, directly return S vin It is returned to the client and then manually identified.
5. The method for generating a data set for model training according to claim 4, characterized in that: Before performing verification processing on the VIN code string, the method further includes: saving the identification frame marked on the image to be identified and the identified VIN code string to an information storage system; The VIN code string is verified to obtain a correct VIN code string, and the verification result is returned to the client, and also includes: if it is found that the VIN code string returned to the client is wrong, the client executes a correction of the VIN code string, and updates the corrected VIN code string to the information storage system.
6. The method for generating a data set for model training according to claim 5, characterized in that: Determining the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and marking the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic, including: Obtain the recognition frame saved after the VIN recognition model recognizes, and record the set of pixels of the recognition frame as M; Get the correct VIN code string, find the position of the correct VIN code string in the recognition frame and mark it, and record the set of pixel points corresponding to the marked correct VIN code string as N; The pixels in set N are removed from set M to generate a set consisting of non-VIN code graphic pixels.
7. A device for generating a data set for model training, characterized in that: The device comprises a first generating module, an identifying module, a verifying module, and a second generating module; wherein: A first generating module is used to generate a first data set according to a preset vehicle identification code (VIN) generating rule; and to perform initial training on a VIN recognition model according to the first data set; The recognition module is used to obtain the vehicle identification code (VIN) recognition request sent by the client; mark the recognition box on the image to be recognized based on the VIN recognition model and recognize the VIN code string; A verification module, used to perform verification processing on the VIN code string, obtain a correct VIN code string, and return the verification result to the client; a marking module, used to determine the pixel points of the non-VIN code graphic according to the identification frame and the correct VIN code string, and mark the non-VIN code graphic in the identification frame according to the pixel points of the non-VIN code graphic; The second generating module is used to generate a second data set according to the identification frame with the non-VIN code graphic marked; and perform secondary training on the VIN recognition model according to the second data set.
8. The device for generating a data set for model training according to claim 7, characterized in that: The marking module is also used for: Obtain the recognition frame saved after the VIN recognition model recognizes, and record the set of pixels of the recognition frame as M; Get the correct VIN code string, find the position of the correct VIN code string in the recognition frame and mark it, and record the set of pixel points corresponding to the marked correct VIN code string as N; The pixels in set N are removed from set M to generate a set consisting of non-VIN code graphic pixels.
9. A computer device, comprising: One or more processors, a memory, wherein the memory is used to store one or more computer programs; characterized in that the computer program is configured to be executed by the one or more processors, and the program includes steps for executing the method for generating a data set for model training as described in any one of claims 1-6.
10. A storage medium storing a computer program; the program is loaded and executed by a processor to implement the steps of the method for generating a data set for model training as described in any one of claims 1 to 6.