CN113408482B - Training sample generation method and generation device - Google Patents

Training sample generation method and generation device Download PDF

Info

Publication number
CN113408482B
CN113408482B CN202110791909.3A CN202110791909A CN113408482B CN 113408482 B CN113408482 B CN 113408482B CN 202110791909 A CN202110791909 A CN 202110791909A CN 113408482 B CN113408482 B CN 113408482B
Authority
CN
China
Prior art keywords
target
tag
vehicle
classification model
vehicle information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110791909.3A
Other languages
Chinese (zh)
Other versions
CN113408482A (en
Inventor
陈晓
张伟
谢思敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Lianji Technology Co ltd
Original Assignee
Hangzhou Lianji Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Lianji Technology Co ltd filed Critical Hangzhou Lianji Technology Co ltd
Priority to CN202110791909.3A priority Critical patent/CN113408482B/en
Publication of CN113408482A publication Critical patent/CN113408482A/en
Application granted granted Critical
Publication of CN113408482B publication Critical patent/CN113408482B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The application is applicable to the technical field of image processing, and provides a training sample generation method and a training sample generation device, wherein the training sample generation method comprises the following steps: acquiring original tag sets corresponding to a plurality of vehicle sample images respectively; first labels corresponding to single target vehicle information are reserved in the original label set, and second labels corresponding to other vehicle information are replaced by preset parameters to obtain a first label set corresponding to the original label set; and circularly executing the steps of obtaining a target first tag set corresponding to each preset sequence in a plurality of first tag sets according to the preset sequences of different target vehicle information to form a first tag set group, and obtaining a target training sample set. After the first labels of the different target vehicle information are circularly arranged, the number of the first labels of the different target vehicle information is uniform and the distribution is circular, so that the uniform distribution of the first labels of the different target vehicle information can be ensured.

Description

Training sample generation method and generation device
Technical Field
The application belongs to the technical field of image processing, and particularly relates to a training sample generation method and device.
Background
The multi-classification model is a common recognition means in the field of image processing, and can be applied to different scenes, for example: the method is applied to a vehicle identification scene to realize identification of the labels corresponding to different vehicle information such as the type of the vehicle, the color of the vehicle, the brand of the vehicle and the orientation of the vehicle. In this case, it is often necessary to simultaneously identify a plurality of tags corresponding to vehicle information in a vehicle sample image for a vehicle identification scene. Therefore, the multi-classification model needs to acquire a training sample with a plurality of labels (the training sample includes a vehicle sample image and a plurality of labels corresponding to the vehicle sample image) in a training stage, and train the multi-classification model through the training sample.
However, in the process of collecting the training samples, all the labels of the vehicle information corresponding to the vehicle sample image cannot be obtained due to the reasons of excessive blurring, main body missing or attribute scarcity of the vehicle sample image. The label distribution of each kind of vehicle information in the training sample set is uneven, and then the classification effect of the multi-classification model obtained by training according to the training sample set is poor. Therefore, how to ensure uniform distribution of various labels in the training sample set becomes a technical problem to be solved.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, an apparatus, a terminal device, and a computer readable storage medium for generating training samples, which can solve the technical problem that data distribution of each tag in a training sample set is not uniform.
A first aspect of an embodiment of the present application provides a method for generating a training sample, where the generating method includes:
acquiring original tag sets corresponding to a plurality of vehicle sample images respectively; the original tag set comprises a set formed by tags corresponding to different vehicle information respectively;
a first label corresponding to single target vehicle information is reserved in the original label set, and second labels corresponding to other vehicle information are replaced by preset parameters, so that a first label set corresponding to the original label set is obtained; the preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first label is used for training or testing the multi-classification model;
according to preset sequences of different target vehicle information, acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets to form a first tag set group; the target first tag set refers to a first tag set comprising the target vehicle information corresponding to the preset sequence;
Circularly executing the preset sequences according to different target vehicle information, acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets, forming a first tag set group, and taking each first tag set group and vehicle sample images corresponding to each first tag set group as target training sample sets; the set of target training samples is used to train the multi-classification model.
A second aspect of an embodiment of the present application provides a generating device for a training sample, where the generating device includes:
the acquisition unit is used for acquiring original tag sets corresponding to the vehicle sample images respectively; the original tag set comprises a set formed by tags corresponding to different vehicle information respectively;
the processing unit is used for reserving first labels corresponding to single target vehicle information in the original label set, and replacing second labels corresponding to other vehicle information with preset parameters to obtain a first label set corresponding to the original label set; the preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first label is used for training or testing the multi-classification model;
The arrangement unit is used for acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets according to the preset sequence of different target vehicle information to form a first tag set group; the target first tag set refers to a first tag set comprising the target vehicle information corresponding to the preset sequence;
the circulation unit is used for circularly executing the steps of acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets according to the preset sequences of different target vehicle information to form first tag set groups, and taking each first tag set group and vehicle sample images corresponding to each first tag set group as target training sample sets; the set of target training samples is used to train the multi-classification model.
A third aspect of an embodiment of the present application provides a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of the first aspect when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method of the first aspect.
Compared with the prior art, the embodiment of the application has the beneficial effects that: according to the method, the first label corresponding to the single target vehicle information in the original label set is reserved, and the second label corresponding to the rest of the vehicle information is replaced by the preset parameter, so that the first label set is obtained. The preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first tag is used to train or test the multi-classification model. That is, there is one and only one tag in each first set of tags. And further, according to the preset sequence of different target vehicle information, acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets to form a first tag set group, and circularly executing the steps to obtain a target training sample set. After the first labels of the different target vehicle information are circularly arranged, the number of the first labels of the different target vehicle information is uniform and the distribution is circular, so that the uniform distribution of the first labels of the different target vehicle information can be ensured. The technical problem of uneven data distribution of each label in the training sample set is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 shows a schematic flow chart of a method for generating training samples provided by the application;
FIG. 2 is a schematic flow chart of step 101 in a training sample generation method according to the present application;
FIG. 3 is a schematic flow chart of step 1012 in a training sample generation method provided by the present application;
FIG. 4 is a schematic flow chart of step 102 in a training sample generation method according to the present application;
FIG. 5 shows a schematic flow chart of another method for generating training samples provided by the application;
FIG. 6 is a schematic flow chart diagram of another training sample generation method provided by the present application;
FIG. 7 shows a schematic flow chart of another method for generating training samples provided by the application;
FIG. 8 is a schematic diagram of a network structure of a target multi-classification model provided by the present application;
FIG. 9 is a schematic diagram of a training sample generating device according to the present application;
fig. 10 is a schematic diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
For a better understanding of the technical problem solved by the present application, the above background art is further described herein with reference to the examples:
the vehicle identification technology is a technology for identifying vehicle information by using a deep learning model. The deep learning network adopted by the vehicle identification technology comprises a single classification model and a multi-classification model. The process of identifying the vehicle information by the single classification model and the multi-classification model is as follows:
(1) Single classification model: the processor invokes a plurality of single classification models, respectively, with different single classification models corresponding to different vehicle information (e.g., vehicle type, vehicle color, vehicle brand, orientation, etc.). Different single classification models respectively identify different vehicle information in the vehicle sample image. Wherein, different single classification models need to be trained and deployed separately. Most devices have limited memory and computational power and cannot carry the storage and operation of multiple single classification models. Meanwhile, the development difficulty and development time are increased by the deployment and design of a plurality of single classification models. In order to overcome the limitations of single classification models, multi-classification models arose.
(2) Multiple classification model: the processor invokes the multi-classification model. The multi-classification model identifies different vehicle information for the vehicle sample image. Multiple vehicle information identification can be achieved without multiple single classification models.
When training the multi-classification model, a training sample (the training sample includes a vehicle sample image and a plurality of labels corresponding to the vehicle sample image) having a plurality of labels (each label corresponds to one piece of vehicle information) needs to be acquired, and the multi-classification model is trained by the training sample.
However, in the process of collecting the training samples, all the labels of the vehicle information corresponding to the vehicle sample image cannot be obtained due to the reasons that the vehicle sample image is too fuzzy, the main body is missing or the vehicle information is scarce. Resulting in uneven distribution of labels corresponding to each type of vehicle information in the training sample set. And then the classification effect of the multi-classification model obtained by training according to the training sample set is poor. Therefore, how to ensure uniform distribution of various labels in the training sample set becomes a technical problem to be solved.
In view of the above, embodiments of the present application provide a training sample generating method, generating apparatus, terminal device, and computer readable storage medium, which can solve the above technical problems.
First, the application provides a training sample generation method. Referring to fig. 1, fig. 1 is a schematic flowchart of a method for generating a training sample according to the present application. As shown in fig. 1, the generating method may include the steps of:
step 101, acquiring original tag sets corresponding to a plurality of vehicle sample images respectively; the original tag set includes a set of respective corresponding tags of different vehicle information.
Different tags are used to characterize different vehicle information. Vehicle information includes, but is not limited to, vehicle type, vehicle color, license plate type, license plate color, vehicle brand, orientation, and the like. The original tag set includes different corresponding tags of the vehicle information, as shown in table 1:
table 1:
wherein table 1 is only for example, and the kind of vehicle information, the number of kinds of vehicle information, the number of labels, and the number of images in table 1 are not limited in any way.
The vehicle sample image a tag set includes the following tag {2,1,0,1}, and the vehicle sample image B tag set includes the following tag {1,2,3,1}, as shown in table 1. Each type of vehicle information corresponds to a plurality of tags, and the plurality of tags respectively represent different vehicle information. For example, a vehicle type corresponding to tag "1" characterizes a minibus and a vehicle type corresponding to tag "2" characterizes a truck. Also for example: the vehicle color label corresponds to label "1" for black and label "2" for white.
The original set of tags may be existing data in a database. The original tag set can also be a tag set obtained by manually pre-labeling a vehicle sample image. Wherein, because the existing data in the database is often less in stock, the training requirement cannot be met. And manual labeling is labor intensive and time consuming. Therefore, the present embodiment provides a way to generate the original label set, which can improve the labeling efficiency and quality, and the specific process is as follows in the alternative embodiment of fig. 2:
As an alternative embodiment of the present application, step 101 includes steps 1011 to 1015. Referring to fig. 2, fig. 2 is a schematic flowchart of step 101 in a training sample generating method according to the present application.
At step 1011, a plurality of first vehicle sample images are acquired and a first multi-classification model is pre-trained.
And acquiring a plurality of training images and training labels corresponding to the training images in the existing database. And outputting the training image to an initial multi-classification model for processing to obtain an initial classification result output by the initial multi-classification model. And updating parameters in the initial multi-classification model by calculating a loss value between the initial classification result and the training label. And each training image and the training label corresponding to each training image sequentially and circularly execute the training process to obtain a first multi-classification model trained in advance. The execution node of the training process may precede step 1011 or be in step 1011.
A plurality of first vehicle sample images are acquired in an existing database.
Step 1012, inputting the first vehicle sample image into the first multi-classification model to obtain a first original label set corresponding to the first vehicle sample image output by the first multi-classification model.
As an alternative embodiment of the present application, step 1012 includes steps A1 to A3. Referring to fig. 3, fig. 3 is a schematic flowchart of step 1012 in a training sample generating method according to the present application.
And A1, intercepting a target image corresponding to an image area where the vehicle is located in each filtered vehicle sample image through a vehicle detection model.
A certain redundant area exists in each filtered vehicle sample image generally, so that a target image corresponding to an image area where a vehicle is located in each filtered vehicle sample image is intercepted through a vehicle detection model, and unnecessary calculation amount is reduced.
And step A2, filtering a plurality of first vehicle sample images through a vehicle filtering model to obtain filtered vehicle sample images.
Since there may be a non-vehicle image in the plurality of first vehicle sample images, the non-vehicle image is filtered by the vehicle filtering model to obtain a filtered vehicle sample image.
And A3, inputting the target image into the first multi-classification model for processing, and outputting a first original label set corresponding to the first vehicle sample image by the first multi-classification model.
Step 1013, acquiring a plurality of second vehicle sample images expanded based on the first original tag set.
There may be a data loss due to the plurality of first vehicle sample images acquired in step 1011, for example: absence of a certain vehicle type or absence of a certain vehicle color, etc. To supplement the missing data, in step 1013, a supplementary vehicle sample image corresponding to the missing data is supplemented based on the vehicle information obtained from the first original tag set. For example: the pick-up type is missing from the vehicle types, and the pick-up image corresponding to the pick-up type is supplemented.
The supplemental vehicle sample image and the first vehicle sample image constitute a second vehicle sample image. The determination of missing data may be performed manually. The missing data list can be obtained by comparing one by one according to a preset vehicle information list, and the supplementary vehicle sample image corresponding to the missing data is supplemented according to the missing data list.
As an alternative embodiment of the present application, the determination of missing data may be performed with respect to only one kind of representative vehicle information to reduce the amount of calculation of the determination. For example: because the sample image corresponding to the vehicle brand often contains more complete vehicle information (i.e., the sample image corresponding to the vehicle brand often contains vehicle information such as vehicle type, vehicle color, license plate type, license plate color, orientation, etc.), the missing data can be determined only according to the vehicle brand. In contrast, if the corresponding color sample image is obtained based on the license plate color, the color sample image is an image that often only includes the license plate region (i.e., vehicle information such as the missing vehicle brand, license plate type, and orientation), so the license plate color is not representative of numerous vehicle information. Therefore, the vehicle brand is preferably selected as a representative, and the missing data is judged.
Step 1014, inputting the second set of vehicle sample images into the first multi-classification model to obtain a second set of original labels corresponding to the second vehicle sample images output by the first multi-classification model.
The execution of step 1014 is similar to that of the alternative embodiment shown in fig. 3, please refer to the alternative embodiment shown in fig. 3, and the description thereof will not be repeated here.
Step 1015, using the second original label set as the original label set corresponding to each of the plurality of vehicle sample images.
Step 102, reserving a first tag corresponding to single target vehicle information in the original tag set, and replacing a second tag corresponding to other vehicle information with a preset parameter to obtain a first tag set corresponding to the original tag set; the preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first tag is used to train or test the multi-classification model.
Due to the different vehicle information in each vehicle sample image, there may be certain deletions, such as: when an image is shot, a license plate cannot be shot, so that information such as a license plate number, a license plate type and a license plate color is lost. Also for example: the vehicle sample image is too blurred to distinguish information such as the vehicle brand and license plate number.
Therefore, the number of missing vehicle information in each vehicle sample image is different, and unified processing cannot be performed. Therefore, the application 'unifies' each original label set in advance for subsequent processing. The "unification" refers to that a first tag corresponding to single target vehicle information is reserved in an original tag set, and a second tag corresponding to other vehicle information is replaced by a preset parameter, so that a first tag set corresponding to the original tag set is obtained. I.e. only one tag remains in each first set of tags.
Illustratively, the "unification" process is as shown in tables 2 and 3:
table 2:
table 3:
wherein tables 2 and 3 are only for example, and the kind of vehicle information, the number of kinds of vehicle information, the number of tags, the preset parameters, and the number of images in tables 2 and 3 are not limited in any way.
As shown in table 2, the original label set of the vehicle sample image a contains only 1 type of labels, the original label set of the vehicle sample image B contains only 3 type of labels, the original label set of the vehicle sample image C contains only 3 type of labels, and the original label set of the vehicle sample image D contains only 2 type of labels.
Each original tag set in table 2 only retains a single target vehicle information, and the second tag corresponding to the rest of the vehicle information is replaced by a preset parameter "-1000" (the preset parameter may also be other values), so as to obtain a first tag set shown in table 3.
It is emphasized that, for the target vehicle information corresponding to each vehicle sample image, a preset is required. The preset mode is as follows: according to the number of types of vehicle information, all the vehicle sample images are equally divided into several copies (the number of copies is equal to the number of types). Each vehicle sample image corresponds to a different type of vehicle information in turn. For example: currently, 1000 vehicle sample images exist, the type number of the vehicle information is 5, the 1000 vehicle sample images are divided into 5 parts (250 parts each) in average, and the 5 vehicle sample images sequentially correspond to different types of vehicle information.
If all the vehicle sample images cannot be halved, that is, the type number cannot be divided, a small number of vehicle sample images can be removed or copied until the number of images of all the vehicle sample images can be divided by the type number.
As an alternative embodiment of the present application, step 102 includes steps 1021 through 1022. Referring to fig. 4, fig. 4 is a schematic flowchart of step 102 in a training sample generating method according to the present application.
Step 1021, correcting the error label set in the plurality of original label sets to obtain a second label set; the error label set refers to a label set obtained by error classification of the multi-classification model.
Due to the original set of labels obtained through the first multi-classification model in the alternative embodiment shown in fig. 2, there may be a wrong set of labels obtained by misclassification. Therefore, after a plurality of original label sets are obtained, the application corrects the error label set in the plurality of original label sets to obtain a second label set.
Step 1022, reserving first tags corresponding to single target vehicle information in the second tag sets, and replacing second tags corresponding to other vehicle information with preset parameters to obtain the first tag set corresponding to each second tag set.
Step 102 may also process all original tag sets as the first tag set without correction for the wrong tag set as an alternative embodiment of the present application.
Step 103, according to preset sequences of different target vehicle information, acquiring a target first tag set corresponding to each preset sequence from a plurality of first tag sets to form a first tag set group; the target first tag set refers to a first tag set comprising the target vehicle information corresponding to the preset sequence.
The preset sequence is a preset sequence so as to orderly arrange the first tag sets with different target vehicle information. The preset sequence can be arranged from difficult to easy or from easy to difficult according to the classification difficulty degree of different target vehicle information.
The target first tag set refers to a first tag set comprising target vehicle information corresponding to a preset sequence.
For example, assume that the preset order of the target vehicle information is a vehicle type tag, a license plate color tag, a vehicle brand tag, and a license plate type tag. Step 103 is performed completely as follows: one target vehicle information is acquired from a plurality of first tag sets as a first target first tag set of a vehicle type. And acquiring a second target first tag set with the target vehicle information being license plate color tags from the plurality of first tag sets. And acquiring one target vehicle information from the plurality of first tag sets as a third target first tag set of the vehicle brand tag. And acquiring a fourth target first tag set with the target vehicle information being the license plate type tag from the plurality of first tag sets. The first target first tag set, the second target first tag set, the third target first tag set, and the fourth target first tag set form a first tag set group. As shown in table 4:
table 4:
wherein table 4 is only for example, and the kind of vehicle information, the number of kinds of vehicle information, the number of labels, the preset parameters, and the number of images in table 4 are not limited in any way.
As shown in table 4, the first tag sets corresponding to the vehicle sample image a, the vehicle sample image C, the vehicle sample image B, and the vehicle sample image D constitute a first tag set group. The classification difficulty of the vehicle type label, the license plate color label, the vehicle brand label and the license plate type label is easy to achieve.
Step 104, circularly executing the steps of acquiring a target first tag set corresponding to each preset sequence from a plurality of first tag sets according to the preset sequences of different target vehicle information to form first tag set groups, and taking each first tag set group and vehicle sample images corresponding to each first tag set group as target training sample sets; the set of target training samples is used to train the multi-classification model.
Step 103 is looped to obtain different first tag sets, where the first tag sets in each first tag set are different (i.e., each first tag set is extracted only once). And taking the vehicle sample images corresponding to each first tag set group as a target training sample set.
Illustratively, taking eight vehicle sample images and four types of vehicle information as examples, two first tag set groups as shown in table 5 may be obtained:
Table 5:
wherein table 5 is only for example, and the kind of vehicle information, the number of kinds of vehicle information, the number of labels, the preset parameters, and the number of images in table 5 are not limited in any way.
As shown in table 5, since each of the first tag sets is arranged in a circle, tag data of each of the vehicle information is uniformly distributed. And the classification performance of the multi-classification model trained according to the uniformly distributed target training sample set is balanced.
As an optional embodiment of the present application, if the number of types of the vehicle information and the number of the plurality of first tag sets cannot be divided completely (i.e. the remaining first tag sets cannot be combined into the first tag set group), the first tag sets that have been taken out are combined with the other remaining first tag sets in sequence from the beginning until the combination of the first tag set with the largest number is completed. For example: the number of the five first tag sets respectively containing different target vehicle information is 5, 4, 3 and 5 respectively. The first type of first tag sets are A1, A2, A3, A4 and A5, the second type of first tag sets are B1, B2, B3, B4 and B5, the third type of first tag sets are C1, C2, C3 and C4, the fourth type of first tag sets are D1, D2 and D3, and the fifth type of first tag sets are E1, E2, E3, E4 and E5. It will be appreciated that the fourth first tag set is first taken out, so that the combination with the remaining first tag sets may be repeated according to the sequence of D1, D2 and D3 until the first tag set with the largest number is combined. The fourth first tag set is legal and will not be described again here.
As an alternative embodiment of the present application, after step 104, steps 105 to 106 are further included. Referring to fig. 5, fig. 5 is a schematic flowchart of another method for generating training samples according to the present application.
And step 105, training the first multi-classification model through the target training sample set to obtain a second multi-classification model.
Because the coverage of the data in the target training sample set obtained after the processing of all the above optional embodiments is often insufficient, multiple cycles are required to obtain a relatively comprehensive target training sample set.
Therefore, the method optimizes the first multi-classification model according to the target training sample set to obtain the second multi-classification model so as to obtain more accurate training samples in the circulation process.
And 106, taking the second multi-classification model as a pre-trained first multi-classification model, taking the image in the target training sample set as the first vehicle sample image, and circularly executing the steps of acquiring a plurality of first vehicle sample images and the pre-trained first multi-classification model and the subsequent steps until the target training sample set meets preset conditions.
Taking the second multi-classification model as a pre-trained first multi-classification model, taking images in a target training sample set as the first vehicle sample images, and circularly executing step 1011, so as to continuously expand the target training sample until the target training sample set meets preset conditions.
The preset condition may be that the number of samples of the target training samples reaches a threshold value or the number of sample types reaches a threshold value.
As an optional embodiment of the present application, the reason that the first multi-classification model is misclassified is often that the first multi-classification model cannot be fully trained in a certain type of vehicle information (i.e. the training data corresponding to a certain type of vehicle information is less), so that the classification error rate of the first multi-classification model for the vehicle information is higher. Therefore, based on the rule, the classification performance of the first multi-classification model can be used as a preset condition.
In this embodiment, a first tag corresponding to single target vehicle information in an original tag set is reserved, and a second tag corresponding to other vehicle information is replaced by a preset parameter to obtain the first tag set. The preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first tag is used to train or test the multi-classification model. That is, there is one and only one tag in each first set of tags. And further, according to the preset sequence of different target vehicle information, acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets to form a first tag set group, and circularly executing the steps to obtain a target training sample set. After the first labels of the different target vehicle information are circularly arranged, the number of the first labels of the different target vehicle information is uniform and the distribution is circular, so that the uniform distribution of the first labels of the different target vehicle information can be ensured. The technical problem of uneven data distribution of each label in the training sample set is solved.
Optionally, on the basis of all the embodiments described above, the generating method further includes the following steps, please refer to fig. 6, fig. 6 shows a schematic flowchart of another generating method of a training sample provided by the present application.
And step 601, training a target multi-classification model through the target training sample set to obtain a trained target multi-classification model.
It will be appreciated that the embodiment shown in fig. 1 to 5 is a process of acquiring a set of target training samples, i.e. a process of acquiring training data. And step 601 is a process of training a target multi-classification model using a set of target training samples. The target multi-classification model may be an initialized multi-classification model or a first multi-classification model. The first multi-classification model is trained for a plurality of times, so that the parameters of the first multi-classification model are better, and the first multi-classification model can be preferentially selected as the target multi-classification model.
As an alternative embodiment of the present application, the step 601 includes steps 6011 to 6018. Referring to fig. 7, fig. 7 is a schematic flowchart of another method for generating training samples according to the present application.
And 6011, inputting the target first label set and the vehicle sample image corresponding to the target first label set into the target multi-classification model.
The target multi-classification model may employ a Caffe deep learning framework. Referring to fig. 8, fig. 8 shows a schematic diagram of a network structure of the target multi-classification model according to the present application. As shown in fig. 8, the target multi-classification model includes an input layer (input layer includes a Data layer and a Slice layer), a feature extraction layer (backbone network), a plurality of first branch networks, and a second branch network. Each branch network is composed of a respective fully connected layer and a Softmax layer. The branch network of the target multi-classification model can be more or less, and can be set according to actual classification requirements.
In step 6012, the input layer inputs the vehicle sample image into a feature extraction layer.
And 6013, performing feature extraction on the vehicle sample image by the feature extraction layer to obtain feature data of the vehicle sample image.
In step 6014, the input layer segments the target first tag set to obtain a plurality of preset parameters and first tags corresponding to the plurality of vehicle information.
Wherein, since the Caffe deep learning framework only supports one-dimensional tags, in order to support multi-dimensional tags (first tag set). Where data tags tend to be in lmdb format, multidimensional tags may typically be in the hdf5 format directly but we typically choose the lmdb format in terms of data read rate and availability to large data sets. The cover_imageset.cpp in Caffe can be modified to support the multi-tag generation of the target first tag set in lmdb format. While storing the first set of tags in the lmdb format, the first set of tags in the lmdb format may be stored into a vector because a single variable cannot store the first set of tags in the lmdb format.
When the first tag set inputs the target multi-classification model, the first tag set needs to be segmented to obtain a plurality of preset parameters and first tags corresponding to the multiple types of vehicle information. In the Caffe deep learning framework, a Slice layer may be used to segment the target first tag set.
As an embodiment of the present application, the input layer may further obtain tags corresponding to various types of vehicle information by: before the input layer is input, different zone bits are set for various vehicle information corresponding labels. When the input layer pulls the labels corresponding to various vehicle information, the corresponding training samples are pulled in the target training samples only according to the zone bit.
Step 6015, the input layer inputs a plurality of preset parameters into the first branch network corresponding to each of the preset parameters; the input layer inputs a first tag into the second branch network.
In step 6016, the first branch network suspends the training operation of the target multi-classification model by the vehicle information corresponding to the preset parameters according to the preset parameters.
Step 6017, the second branch network obtains a target classification prediction result according to the characteristic data; calculating a loss between the target classification prediction result and the first tag; and updating the network weight parameters in the target multi-classification model according to the loss.
And obtaining a target classification result (namely labels corresponding to various vehicle information) by the full-connection layer in the second branch network according to the characteristic data. The Softmax layer calculates the probability of each tag, and the calculation process is as follows:
where a represents the probability of the Softmax layer output, Z represents the label of the fully connected layer,representing the output of n e zj And (5) adding.
According to the probability output by the Softmax layer and the first label, calculating a loss value, wherein the calculation process is as follows:
/>
where Loss represents a Loss value, y represents a probability (1 or 0) corresponding to the first tag, and a represents a probability of the Softmax layer output.
And carrying out back propagation according to the loss value, and updating network parameters in the target multi-classification model.
In step 6018, each target training sample sequentially executes the step of inputting the target first label set and the vehicle sample image corresponding to the target first label set into the target multi-classification model and the subsequent step to obtain a trained target multi-classification model.
As an alternative embodiment of the present application, the target training sample set may be divided into a training set and a test set, where the training set is used to perform the processes of steps 6011 to 6018, to obtain the target multi-classification model. The test set is used to verify the classification accuracy of the target multi-classification model. And if the classification accuracy of the target multi-classification model is lower than the threshold value, repeatedly acquiring a new training set training target multi-classification model until the classification accuracy is not lower than the threshold value.
In this embodiment, because the first labels of different target vehicle information in the target training sample set are uniformly distributed, the phenomenon that a target multi-classification model obtained by training according to the target training sample set is fitted to a certain class is avoided, the classification performance is more balanced, and the classification accuracy of each class of processed information is high. And because of the multi-task combined training, local minimum values of different tasks in the multi-task are positioned at different positions, and the hidden layer can be prevented from sinking into the local minimum values through interaction.
Referring to fig. 9, fig. 9 is a schematic diagram of a training sample generating device provided by the present application, and fig. 9 is a schematic diagram of a training sample generating device provided by the present application, where the training sample generating device shown in fig. 9 includes:
an acquiring unit 91, configured to acquire original tag sets corresponding to a plurality of vehicle sample images respectively; the original tag set comprises a set formed by tags corresponding to different vehicle information respectively;
the processing unit 92 is configured to retain a first tag corresponding to single target vehicle information in the original tag set, and replace a second tag corresponding to other vehicle information with a preset parameter, so as to obtain a first tag set corresponding to the original tag set; the preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first label is used for training or testing the multi-classification model;
An arrangement unit 93, configured to obtain, from a plurality of first tag sets, one target first tag set corresponding to each preset sequence according to a preset sequence of different target vehicle information, to form a first tag set group; the target first tag set refers to a first tag set comprising the target vehicle information corresponding to the preset sequence;
a circulation unit 94, configured to perform the steps of circularly performing the preset sequences according to different pieces of the target vehicle information, obtain a target first tag set corresponding to each preset sequence from a plurality of first tag sets, form a first tag set group, and use each first tag set group and a vehicle sample image corresponding to each first tag set group as a target training sample set; the set of target training samples is used to train the multi-classification model.
According to the generating device of the training samples, the generating device reserves the first label corresponding to the single target vehicle information in the original label set, and replaces the second label corresponding to the rest of the vehicle information with the preset parameter to obtain the first label set. The preset parameters are used for suspending the training operation or the testing operation of the rest vehicle information on the multi-classification model. That is, there is one and only one tag in each first set of tags. And further, according to the preset sequence of different target vehicle information, acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets to form a first tag set group, and circularly executing the steps to obtain a target training sample set. After the first labels of the different target vehicle information are circularly arranged, the number of the first labels of the different target vehicle information is uniform and the distribution is circular, so that the uniform distribution of the first labels of the different target vehicle information can be ensured. The technical problem of uneven data distribution of each label in the training sample set is solved.
Fig. 10 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 10, a terminal device 10 of this embodiment includes: a processor 1001, a memory 1002 and a computer program 1003 stored in said memory 1002 and executable on said processor 1001, for example a training sample acquisition program. The steps of the above-described embodiments of a method for generating training samples, such as steps 101 to 104 shown in fig. 1, are implemented by the processor 1001 when executing the computer program 1003. Alternatively, the processor 1001 implements the functions of the units in the above-described embodiments of the apparatus, such as the functions of the units 91 to 94 shown in fig. 9, when executing the computer program 1003.
By way of example, the computer program 1003 may be split into one or more units that are stored in the memory 1002 and executed by the processor 1001 to perform the present invention. The one or more units may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 1003 in the one terminal device 10. For example, the specific functions of the computer program 1003 may be divided into units as follows:
The acquisition unit is used for acquiring original tag sets corresponding to the vehicle sample images respectively; the original tag set comprises a set formed by tags corresponding to different vehicle information respectively;
the processing unit is used for reserving first labels corresponding to single target vehicle information in the original label set, and replacing second labels corresponding to other vehicle information with preset parameters to obtain a first label set corresponding to the original label set; the preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first label is used for training or testing the multi-classification model;
the arrangement unit is used for acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets according to the preset sequence of different target vehicle information to form a first tag set group; the target first tag set refers to a first tag set comprising the target vehicle information corresponding to the preset sequence;
the circulation unit is used for circularly executing the steps of acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets according to the preset sequences of different target vehicle information to form first tag set groups, and taking each first tag set group and vehicle sample images corresponding to each first tag set group as target training sample sets; the set of target training samples is used to train the multi-classification model.
Including but not limited to a processor 1001 and a memory 1002. It will be appreciated by those skilled in the art that fig. 10 is merely an example of one type of terminal device 10 and is not meant to be limiting as to one type of terminal device 10, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the one type of terminal device may also include input and output devices, network access devices, buses, etc.
The processor 1001 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 1002 may be an internal storage unit of the terminal device 10, for example, a hard disk or a memory of the terminal device 10. The memory 1002 may also be an external storage device of the terminal device 10, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 10. Further, the memory 1002 may also include both an internal storage unit and an external storage device of the one terminal device 10. The memory 1002 is used for storing the computer program and other programs and data required for the one roaming control device. The memory 1002 may also be used to temporarily store data that has been output or is to be output.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that enable the implementation of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to a detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is monitored" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon monitoring a [ described condition or event ]" or "in response to monitoring a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method for generating training samples, the method comprising:
acquiring original tag sets corresponding to a plurality of vehicle sample images respectively; the original tag set comprises a set formed by tags corresponding to different vehicle information respectively;
a first label corresponding to single target vehicle information is reserved in the original label set, and second labels corresponding to other vehicle information are replaced by preset parameters, so that a first label set corresponding to the original label set is obtained; the preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first label is used for training or testing the multi-classification model;
according to preset sequences of different target vehicle information, acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets to form a first tag set group; the first target tag set is a first tag set comprising the target vehicle information corresponding to the preset sequence, the first tag set group comprises different tag sets, and the vehicle information in the tag sets corresponds to different preset sequences;
Circularly executing the preset sequences according to different target vehicle information, acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets, forming a first tag set group, and taking each first tag set group and vehicle sample images corresponding to each first tag set group as target training sample sets; the first label sets in each first label set group are different, and the target training sample set is used for training or testing the multi-classification model.
2. The method of generating of claim 1, wherein the acquiring the respective sets of raw labels for the plurality of vehicle sample images comprises:
acquiring a plurality of first vehicle sample images and a first multi-classification model trained in advance;
inputting the first vehicle sample image into the first multi-classification model for processing to obtain a first original tag set corresponding to the first vehicle sample image output by the first multi-classification model;
acquiring a plurality of second vehicle sample images expanded based on the first original tag set;
inputting the second vehicle sample image set into the first multi-classification model for processing to obtain a second original label set corresponding to the second vehicle sample image output by the first multi-classification model;
And taking the second original label set as the original label set corresponding to each of a plurality of vehicle sample images.
3. The generating method according to claim 2, wherein after the step of circularly executing the preset order according to the different target vehicle information, acquiring one target first tag set corresponding to each preset order from a plurality of the first tag sets, forming first tag set groups, and taking each of the first tag set groups and the vehicle sample image corresponding to each of the first tag set groups as a target training sample set, further comprising:
training the first multi-classification model through the target training sample set to obtain a second multi-classification model;
taking the second multi-classification model as a first multi-classification model trained in advance, taking the image in the target training sample set as the first vehicle sample image, and circularly executing the steps of acquiring a plurality of first vehicle sample images and the first multi-classification model trained in advance and the subsequent steps until the target training sample set meets preset conditions.
4. The generating method according to claim 2, wherein the inputting the first vehicle sample image into the first multi-classification model process to obtain a first original label set corresponding to the first vehicle sample image output by the first multi-classification model includes:
Intercepting a target image corresponding to an image area where a vehicle is located in each filtered vehicle sample image through a vehicle detection model;
filtering a plurality of first vehicle sample images through a vehicle filtering model to obtain filtered vehicle sample images;
and inputting the target image into the first multi-classification model for processing to obtain a first original tag set corresponding to the first vehicle sample image output by the first multi-classification model.
5. The method of generating as claimed in claim 1, wherein the steps of reserving a first tag corresponding to a single target vehicle information in the original tag set, and replacing a second tag corresponding to the remaining vehicle information with a preset parameter to obtain the first tag set corresponding to the original tag set, include:
correcting the error label set in the plurality of original label sets to obtain a second label set; the error label set refers to a label set obtained by error classification of the multi-classification model;
and reserving first tags corresponding to single target vehicle information in the second tag sets, and replacing second tags corresponding to the rest of vehicle information with preset parameters to obtain the first tag set corresponding to each second tag set.
6. The generation method according to any one of claims 1 to 5, characterized in that the method further comprises:
and training the target multi-classification model through the target training sample set to obtain a trained target multi-classification model.
7. The method of generating of claim 6, wherein the target multi-classification model comprises an input layer, a feature extraction layer, a plurality of first branch networks, and a second branch network;
training the target multi-classification model through the target training sample set to obtain a trained target multi-classification model, wherein the training comprises the following steps:
inputting a target first tag set and a vehicle sample image corresponding to the target first tag set into the target multi-classification model;
the input layer inputs the vehicle sample image into a feature extraction layer;
the feature extraction layer performs feature extraction on the vehicle sample image to obtain feature data of the vehicle sample image;
the input layer cuts the target first label set to obtain a plurality of preset parameters and first labels corresponding to a plurality of pieces of vehicle information;
the input layer inputs a plurality of preset parameters into the first branch network corresponding to the preset parameters respectively; the input layer inputs a first label into the second branch network;
The first branch network pauses training operation of the target multi-classification model by vehicle information corresponding to the preset parameters according to the preset parameters;
the second branch network obtains a target classification prediction result according to the characteristic data; calculating a loss between the target classification prediction result and the first tag; updating network weight parameters in the target multi-classification model according to the loss;
and each target training sample sequentially executes the step of inputting the target first label set and the vehicle sample image corresponding to the target first label set into the target multi-classification model and the subsequent step to obtain the trained target multi-classification model.
8. A training sample generation device, characterized in that the generation device comprises:
the acquisition unit is used for acquiring original tag sets corresponding to the vehicle sample images respectively; the original tag set comprises a set formed by tags corresponding to different vehicle information respectively;
the processing unit is used for reserving first labels corresponding to single target vehicle information in the original label set, and replacing second labels corresponding to other vehicle information with preset parameters to obtain a first label set corresponding to the original label set; the preset parameters are used for suspending training operation or testing operation of the rest vehicle information on the multi-classification model; the first label is used for training or testing the multi-classification model;
The arrangement unit is used for acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets according to the preset sequence of different target vehicle information to form a first tag set group; the first tag sets in each first tag set group are different, the target first tag set refers to a first tag set comprising the target vehicle information corresponding to the preset sequence, the first tag set group comprises different tag sets, and meanwhile, the vehicle information in the tag sets corresponds to different preset sequences;
the circulation unit is used for circularly executing the steps of acquiring one target first tag set corresponding to each preset sequence from a plurality of first tag sets according to the preset sequences of different target vehicle information to form first tag set groups, and taking each first tag set group and vehicle sample images corresponding to each first tag set group as target training sample sets; the set of target training samples is used to train or test the multi-classification model.
9. A terminal device, characterized in that it comprises a memory, a processor and a computer program stored in the memory and executable on the processor, which processor, when executing the computer program, realizes the steps of the method according to any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 7.
CN202110791909.3A 2021-07-13 2021-07-13 Training sample generation method and generation device Active CN113408482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110791909.3A CN113408482B (en) 2021-07-13 2021-07-13 Training sample generation method and generation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110791909.3A CN113408482B (en) 2021-07-13 2021-07-13 Training sample generation method and generation device

Publications (2)

Publication Number Publication Date
CN113408482A CN113408482A (en) 2021-09-17
CN113408482B true CN113408482B (en) 2023-10-10

Family

ID=77686183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110791909.3A Active CN113408482B (en) 2021-07-13 2021-07-13 Training sample generation method and generation device

Country Status (1)

Country Link
CN (1) CN113408482B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114677541B (en) * 2022-03-23 2023-04-28 成都智元汇信息技术股份有限公司 Method and system for extracting bonding sample set based on target

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874840A (en) * 2016-12-30 2017-06-20 东软集团股份有限公司 Vehicle information recognition method and device
CN106971174A (en) * 2017-04-24 2017-07-21 华南理工大学 A kind of CNN models, CNN training methods and the vein identification method based on CNN
CN109903127A (en) * 2019-02-14 2019-06-18 广州视源电子科技股份有限公司 Group recommendation method and device, storage medium and server
CN109961094A (en) * 2019-03-07 2019-07-02 北京达佳互联信息技术有限公司 Sample acquiring method, device, electronic equipment and readable storage medium storing program for executing
CN110781919A (en) * 2019-09-23 2020-02-11 腾讯云计算(北京)有限责任公司 Classification model training method, classification device and classification equipment
WO2020083073A1 (en) * 2018-10-23 2020-04-30 苏州科达科技股份有限公司 Non-motorized vehicle image multi-label classification method, system, device and storage medium
CN112101175A (en) * 2020-09-09 2020-12-18 沈阳帝信人工智能产业研究院有限公司 Expressway vehicle detection and multi-attribute feature extraction method based on local images
CN112257650A (en) * 2020-11-04 2021-01-22 南京领行科技股份有限公司 Passenger portrait method, device, storage medium and electronic equipment
CN112529100A (en) * 2020-12-24 2021-03-19 深圳前海微众银行股份有限公司 Training method and device for multi-classification model, electronic equipment and storage medium
CN113033715A (en) * 2021-05-24 2021-06-25 禾多科技(北京)有限公司 Target detection model training method and target vehicle detection information generation method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463907B (en) * 2017-08-08 2021-06-25 东软集团股份有限公司 Vehicle collision detection method and device, electronic equipment and vehicle
US10878296B2 (en) * 2018-04-12 2020-12-29 Discovery Communications, Llc Feature extraction and machine learning for automated metadata analysis

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874840A (en) * 2016-12-30 2017-06-20 东软集团股份有限公司 Vehicle information recognition method and device
CN106971174A (en) * 2017-04-24 2017-07-21 华南理工大学 A kind of CNN models, CNN training methods and the vein identification method based on CNN
WO2020083073A1 (en) * 2018-10-23 2020-04-30 苏州科达科技股份有限公司 Non-motorized vehicle image multi-label classification method, system, device and storage medium
CN109903127A (en) * 2019-02-14 2019-06-18 广州视源电子科技股份有限公司 Group recommendation method and device, storage medium and server
CN109961094A (en) * 2019-03-07 2019-07-02 北京达佳互联信息技术有限公司 Sample acquiring method, device, electronic equipment and readable storage medium storing program for executing
CN110781919A (en) * 2019-09-23 2020-02-11 腾讯云计算(北京)有限责任公司 Classification model training method, classification device and classification equipment
CN112101175A (en) * 2020-09-09 2020-12-18 沈阳帝信人工智能产业研究院有限公司 Expressway vehicle detection and multi-attribute feature extraction method based on local images
CN112257650A (en) * 2020-11-04 2021-01-22 南京领行科技股份有限公司 Passenger portrait method, device, storage medium and electronic equipment
CN112529100A (en) * 2020-12-24 2021-03-19 深圳前海微众银行股份有限公司 Training method and device for multi-classification model, electronic equipment and storage medium
CN113033715A (en) * 2021-05-24 2021-06-25 禾多科技(北京)有限公司 Target detection model training method and target vehicle detection information generation method

Also Published As

Publication number Publication date
CN113408482A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
CN112561080B (en) Sample screening method, sample screening device and terminal equipment
JP2015087903A (en) Apparatus and method for information processing
KR20130085697A (en) Image partitioning method using high-order correlation clustering, system processing the method and recording medium
CN108241662B (en) Data annotation optimization method and device
EP4293631A1 (en) Method and apparatus for image clustering, computer device, and storage medium
CN114333040B (en) Multi-level target detection method and system
CN113408482B (en) Training sample generation method and generation device
CN111814832A (en) Target detection method, device and storage medium
CN113902944A (en) Model training and scene recognition method, device, equipment and medium
US20240013516A1 (en) Method and system for deep learning based image feature extraction
CN111178037A (en) Repeated defect report identification method and device and electronic equipment
CN115526859A (en) Method for identifying production defects, distributed processing platform, equipment and storage medium
CN114662568A (en) Data classification method, device, equipment and storage medium
CN112699908B (en) Method for labeling picture, electronic terminal, computer readable storage medium and equipment
CN110085209B (en) Tone screening method and device
CN110019900B (en) Structure labeling method and device for fundus image
CN114898186B (en) Fine-grained image recognition model training method, fine-grained image recognition model training device, image recognition method and image recognition device
CN111400522B (en) Traffic sign recognition method, training method and equipment
CN116862903B (en) Defect detection model training method and device, defect detection method and electronic equipment
CN117708726B (en) Open set class training method and device for network model decoupling and storage medium thereof
CN110634107B (en) Standardization method for enhancing brain magnetic resonance image brightness aiming at T1
CN112508062B (en) Open set data classification method, device, equipment and storage medium
CN113139579B (en) Image classification method and system based on image feature self-adaptive convolution network
CN114418868A (en) Image enhancement method, device, server and storage medium
CN117319578A (en) Surgical video editing method and system based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant