CN109711285B - Training and testing method and device for recognition model - Google Patents
Training and testing method and device for recognition model Download PDFInfo
- Publication number
- CN109711285B CN109711285B CN201811508096.7A CN201811508096A CN109711285B CN 109711285 B CN109711285 B CN 109711285B CN 201811508096 A CN201811508096 A CN 201811508096A CN 109711285 B CN109711285 B CN 109711285B
- Authority
- CN
- China
- Prior art keywords
- image
- identified
- recognized
- recognition model
- training
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention provides a training and testing method and a device for an identification model, wherein the method comprises the following steps: the method comprises the steps of controlling an object to be recognized to move along a set track, controlling a sensor arranged at a fixed position to collect an image of the object to be recognized in the process of moving along the set track, labeling the collected image according to the identification of the object to be recognized, performing model training on a recognition model by using the labeled image, collecting the image of the object to be recognized moving on the set track by controlling the sensor arranged at the fixed position, labeling the collected image according to the known identification information of the object to be recognized, and manually labeling the collected image after one-to-one identification without manual identification, thereby reducing the labor cost, improving the efficiency of image labeling, solving the problems that the recognition model based on deep learning in the prior art needs to consume a large amount of manually collected images and perform image labeling, and having lower efficiency, the cost is high.
Description
Technical Field
The invention relates to the technical field of traffic sign recognition, in particular to a training and testing method and device for a recognition model.
Background
The traffic sign recognition is one of the necessary capabilities of intelligent vehicles, and is mainly to collect traffic sign information on roads through a camera mounted on a vehicle and recognize the signs through a pre-trained model, so that important traffic information (such as speed limit, no stop and the like) can be timely transmitted to a control system of the intelligent vehicle to control the safe operation of the vehicle, and therefore, the traffic sign recognition accurately, efficiently and in real time plays an important role in vehicle driving.
In the prior art, a deeply learned traffic sign recognition algorithm model is adopted, a large number of original video images with expected values manually marked in advance are required to serve as training data for the model to be trained, and then the trained model is adopted for testing the model. However, traffic signs are of various types, are difficult to collect and label, consume a large amount of manpower, financial resources and material resources, and cannot meet the requirements of various training data and test data.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present invention is to provide a training method for an identification model, which acquires an image of an object to be identified moving on a set track by controlling a sensor arranged at a fixed position, and labels the acquired image according to known identification information of the object to be identified, without manually identifying the acquired image one by one and then manually labeling the acquired image, so as to reduce labor cost and improve efficiency of image labeling.
The second purpose of the invention is to provide a test method for identifying a model.
The third purpose of the invention is to provide a training device for identifying the model.
A fourth object of the present invention is to provide a test apparatus for identifying a model.
A fifth object of the invention is to propose a computer device.
A sixth object of the invention is to propose a non-transitory computer-readable storage medium.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a training method for recognizing a model, including:
controlling an object to be identified to move along a set track;
in the process that the object to be recognized moves along the set track, controlling a sensor arranged at a fixed position to acquire an image of the object to be recognized;
marking the acquired image according to the identification of the object to be recognized;
and performing model training on the recognition model by using the marked image.
In order to achieve the above object, a second aspect of the present invention provides a testing method for identifying a model, including:
controlling an object to be identified to move along a set track;
in the process that the object to be recognized moves along the set track, controlling a sensor arranged at a fixed position to acquire an image of the object to be recognized;
inputting the collected image into a recognition model to obtain an object identifier output by the recognition model;
and testing the recognition model according to whether the object identification is matched with the object to be recognized.
In order to achieve the above object, a third aspect of the present invention provides a training apparatus for recognizing a model, the apparatus including:
the control module is used for controlling the object to be identified to move along a set track;
the acquisition module is used for controlling a sensor arranged at a fixed position to acquire an image of the object to be identified in the process that the object to be identified moves along the set track;
the first labeling module is used for labeling the acquired image according to the identification of the object to be recognized;
and the training module is used for carrying out model training on the recognition model by adopting the marked image.
To achieve the above object, a fourth aspect of the present invention provides a testing apparatus for identifying a model, the apparatus comprising:
the moving module is used for controlling the object to be identified to move along a set track;
the processing module is used for controlling a sensor arranged at a fixed position to acquire an image of the object to be identified in the process that the object to be identified moves along the set track;
the input module is used for inputting the collected image into a recognition model to obtain an object identifier output by the recognition model;
and the first testing module is used for testing the recognition model according to whether the object identification is matched with the object to be recognized.
To achieve the above object, a fourth embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the training method according to the first aspect or implements the testing method according to the second aspect.
To achieve the above object, a fourth embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the training method according to the first aspect or the testing method according to the second aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the method comprises the steps of controlling an object to be recognized to move along a set track, controlling a sensor arranged at a fixed position to collect images of the object to be recognized in the moving process of the object to be recognized along the set track, marking the collected images according to identification information of the object to be recognized, performing model training on a recognition model by using the marked images, collecting the images of the object to be recognized moving on the set track by controlling the sensor arranged at the fixed position, marking the collected images according to known identification information of the object to be recognized, and manually marking the collected images after one-to-one recognition without manual operation, so that the labor cost is reduced, and the efficiency of image marking is improved.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a training method for recognizing a model according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating another recognition model training method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a testing method for identifying a model according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another testing method for recognition models according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a training apparatus for recognizing models according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a testing apparatus for identifying a model according to an embodiment of the present invention; and
FIG. 7 illustrates a block diagram of an exemplary computer device suitable for use to implement embodiments of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The training and testing method and apparatus of the recognition model according to the embodiments of the present invention are described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a training method for a recognition model according to an embodiment of the present invention.
As shown in fig. 1, the method comprises the steps of:
As a possible implementation manner, a set of cableways is built along the road on both sides of the road in a specific field, and the cableways are provided with driving devices which can drive the object to be identified to move at a set speed and direction along the track constrained by the cableways.
And 102, controlling a sensor arranged at a fixed position to acquire an image of the object to be recognized in the process that the object to be recognized moves along the set track.
In the embodiment of the present invention, the sensor is a sensor having an image capturing function, for example, an image sensor, and the sensor may be disposed in the camera or the monitoring camera, which is not limited in this embodiment.
Specifically, a sensor with an image acquisition function is fixedly arranged at a specific position of a road, and the sensor arranged at the fixed position is controlled to acquire an image of an object to be identified in the process that the object to be identified moves along the cableway at a preset speed and direction, so as to obtain a plurality of images.
Optionally, the object to be recognized may also be subjected to appropriate occlusion and/or contamination treatment, and the recognition capability of the recognition model on the object to be recognized in the abnormal scene may be improved by setting the object to be recognized in various states, and acquiring images of the object to be recognized in the various states as training samples for subsequent model training.
And 103, marking the acquired image according to the identification of the object to be recognized.
Specifically, a mark of the object to be recognized is obtained, for example, the object to be recognized is a traffic signboard, and the mark of the traffic signboard includes a type and a meaning of the traffic signboard, for example, the type of the traffic signboard is a speed limit type signboard, and the meaning of the traffic signboard is a speed limit of 30 km/h, or a speed limit of 60 km/h, and the like, where the mark of the object to be recognized is a preset parameter, and according to the mark of the object to be recognized, the collected image is automatically marked through known mark information, manual marking after the collected image is manually recognized one by one is not needed, so that labor cost is reduced, and meanwhile, efficiency of image marking is improved.
And 104, performing model training on the recognition model by using the marked image.
Specifically, the marked acquired image is used as a training sample to train a recognition model of the image to be recognized, so that the recognition model can learn to obtain a corresponding relation between the input image and the object identifier, that is, the trained model can recognize the identifier corresponding to the object to be recognized contained in the current image to be acquired.
In the recognition model training method, an object to be recognized is controlled to move along a set track, in the process that the object to be recognized moves along the set track, a sensor arranged at a fixed position is controlled to collect images of the object to be recognized, the collected images are labeled according to the identification of the object to be recognized, the labeled images are used for model training of the recognition model, the sensor arranged at the fixed position is controlled to collect the images of the object to be recognized moving on the set track, the collected images are labeled according to the known identification information of the object to be recognized, manual labeling is not needed after the collected images are recognized one by one, the labor cost is reduced, and meanwhile, the efficiency of image labeling is improved.
The previous embodiment describes that, by collecting images of an object to be recognized moving along a preset track, because the identification information of the object to be recognized is known information, automatic marking of the collected images can be realized by utilizing the identification information, and a recognition model is trained through the marked images, the method of the embodiment of the invention is mainly applied to the recognition scene of an intelligent vehicle on a traffic signboard, whether the relative position of the intelligent vehicle and the traffic signboard can be accurately recognized also affects the running safety of the vehicle, for example, the traffic signboard indicating a front road fault, therefore, based on the previous embodiment, the embodiment of the invention provides another training method of the recognition model, obtains the relative position information of the traffic signboard and the intelligent vehicle through calculation, and marks the collected images by using the relative position information and the identification information as marking information, and training the recognition model by taking the marked image as a training sample so as to improve the fineness of model recognition.
Fig. 2 is a schematic flow chart of another recognition model training method according to an embodiment of the present invention, and as shown in fig. 2, the method may include the following steps:
Specifically, reference may be made to step 101 in the previous embodiment, and the principle is the same, which is not described herein again.
In the embodiment of the invention, the objects to be identified are traffic signs, and the plurality of traffic signs comprise traffic signs marked with various traffic signs, and/or traffic signs under various shielding states, and/or traffic signs under various fouling states. The traffic signboard in various states is set, and the images of the traffic signboard in various states are collected to be used as training samples for subsequent model training, so that the recognition capability of the recognition model on the traffic signboard in an abnormal scene can be improved.
Specifically, the sensor arranged at a fixed position is, for example, an image acquisition module in the intelligent vehicle in an actual operation scene of the intelligent vehicle, and the sensor is fixed at a specific position of the test road according to the driving requirement of the intelligent vehicle in the actual operation scene of the intelligent vehicle at a preset height, a preset pitch angle, a preset rotation angle and the like, so that the sensor can acquire an image of the traffic signboard within a preset range, and the traffic signboard included in the acquired image determines corresponding identification information because the identification information of the traffic signboard is known information.
And step 203, determining the position to which the object to be recognized moves along the set track when the sensor collects the image.
Specifically, the time when the sensor collects the image is determined, the moving distance of the driving device when the sensor collects the image is calculated according to the set moving speed of the driving device, and the position to which the driving device moves along the set track can be determined according to the moving distance and the moving direction of the driving device.
It should be noted that, in this embodiment, in order to obtain the position to which the object to be identified moves along the set track when obtaining the captured image, therefore, in order to simplify the calculation, the driving device may move at a set speed and a set speed at a constant speed, but the comparison in this embodiment is not limited.
And 204, determining the relative position relationship between the sensor and the object to be identified according to the position to which the object to be identified moves along the set track when the sensor acquires the image, and acquiring the acquired image under various relative position relationships.
Specifically, the position of the sensor is fixed, and according to the position to which the object to be recognized moves along the set track when the sensor collects the image, the relative position relationship between the sensor and the object to be recognized can be determined, wherein the relative position relationship includes the relative height, the relative distance, the relative orientation and the like between the object to be recognized and the sensor collecting the image. Furthermore, in the moving process of the object to be identified, the sensor is controlled to collect images for multiple times, and the time when the images are collected every time is recorded, so that the images collected under various relative position relations can be obtained.
Specifically, after a plurality of images are acquired, the acquired images are labeled according to the relative position relationship between the sensor corresponding to each acquired image and the object to be recognized and the predetermined identification information of the currently acquired object to be recognized, and the labeled images are used as samples for training the recognition model.
And step 206, performing model training on the recognition model by using the marked image.
Specifically, the identification of the object to be recognized in the image and the relative position relationship between the vehicle and the traffic sign when the image is collected are marked in advance in the sample image, the recognition model is input for training, so that the model can learn to obtain the corresponding relationship between the collected image and the object to be recognized, the model can be applied to an actual vehicle running scene to intelligently recognize the traffic sign, and the vehicle is indicated to run.
In the training method of the recognition model of the embodiment of the invention, in the process that the object to be recognized moves along the set track, according to the set speed and the direction of the movement of the driving device, the position of the driving device on the cableway when the sensor collects the image can be calculated and determined, so as to determine the position to which the object to be recognized moves along the set track, further determine the relative position between the sensor arranged at a fixed position and the object to be recognized, the collected image is labeled according to the relative position relation and the mark of the object to be recognized in the collected image, the labeled image is used as the training sample, the relative position relation calculated and determined by the preset mark information of the object to be recognized and the collected image is labeled, the manpower is saved, the manpower cost is reduced, the image labeling efficiency is improved, and a sufficient number of training samples can be provided for the model training, thereby improving the accuracy of model training.
In the foregoing embodiment, a method for intelligently labeling an acquired image according to known identification information and calculated relative position information in a model training scenario to obtain a training sample and train a model is described, and an image is obtained after the image is labeled according to the known identification information and can be used as a test sample for testing a trained recognition model.
Fig. 3 is a schematic flowchart of a testing method for identifying a model according to an embodiment of the present invention, as shown in fig. 3, the method includes the following steps:
and 301, controlling the object to be identified to move along a set track.
In the embodiment of the invention, the objects to be identified are traffic signs, and the traffic signs are multiple and comprise traffic signs marked with various traffic signs, and/or traffic signs under various shielding states, and/or traffic signs under various fouling states.
As a possible implementation manner, a set of cableways is built along the road on both sides of the road in a specific field, a driving device is arranged on each cableway, traffic signs can be hung on the driving devices, and the driving devices can drive an object to be identified to move at a set speed and direction along the constrained track of each cableway.
And 302, controlling a sensor arranged at a fixed position to acquire an image of the object to be recognized in the process that the object to be recognized moves along the set track.
In an embodiment of the present invention, the sensor is a sensor having an image capturing function, for example, an image sensor, and the sensor may be disposed in a camera or a monitoring camera, which is not limited in this embodiment.
Specifically, a sensor with an image acquisition function is fixedly arranged at a specific position of the cableway, and in the process that the object to be identified moves along the cableway at a preset speed and direction, the sensor arranged at the fixed position is controlled to acquire images of the object to be identified at preset time intervals or at preset time points, so that a plurality of images are acquired.
Wherein the object identification contains the name of the object, the type and meaning of the object, and the like.
Specifically, the image acquired in step 302 is input into the trained recognition model, the recognition model has been learned through training in advance to obtain the corresponding relationship between the image and the identifier of the object, and the identifier of the object included in the image can be output according to the input image.
And step 304, testing the recognition model according to whether the object identification is matched with the object to be recognized.
Specifically, whether the object identifier output by the model is matched with the identifier of the object to be recognized is determined, if the matching indicates that the training effect of the model is good, the identifier of the object to be recognized in the image can be accurately recognized through the model, and if the matching indicates that the training effect of the model is not good, the training effect of the model is poor, the model needs to be trained again, for example, the number of training samples is increased, and the like.
In the method for testing the identification model, the object to be identified is controlled to move along the set track, the sensor arranged at the fixed position is controlled in the process that the object to be identified moves along the set track, the object to be identified moving on the set track is acquired, because the identification information of the object to be identified is a known parameter, the acquired image containing the identification information of the object to be identified is used as a test sample and is input into the identification model, the object identification output by the identification model is obtained, whether the object identification is matched with the object to be identified is determined, the identification accuracy of the identification model is tested, the test sample is not required to be manually marked, and the labor cost is reduced.
Based on the previous embodiment, the embodiment of the present invention provides a flow diagram of another method for testing an identification model, and further illustrates that, in the process of acquiring an image, not only can identification information of an object to be identified in the image be acquired, but also a relative position relationship between the object to be identified and a sensor can be calculated and determined. Fig. 4 is a schematic flowchart of another testing method for an identification model according to an embodiment of the present invention, as shown in fig. 4, the method includes the following steps:
And 402, controlling a sensor arranged at a fixed position to acquire an image of the object to be recognized in the process that the object to be recognized moves along the set track.
Specifically, step 401 to step 402 may refer to steps 301 and 302 in the previous embodiment, and the principle is the same, which is not described herein again.
And step 403, determining the position to which the object to be recognized moves along the set track when the sensor collects the image.
And 404, determining the relative position relationship between the sensor and the object to be identified according to the position to which the object to be identified moves along the set track when the sensor acquires the image, and acquiring the acquired image under various relative position relationships.
Specifically, step 403 to step 404 may refer to step 203 to step 204 in the corresponding embodiment of fig. 2, and the principle is the same, which is not described herein again.
Specifically, the object to be recognized included in the acquired image is determined through calculation in the above steps, when the image acquisition is performed, the relative position relationship between the object to be recognized and the sensor acquiring the image includes the relative height, the relative distance, the relative orientation and the like between the object to be recognized and the sensor acquiring the image, and meanwhile, since the identification of the object to be recognized is known, the acquired image is input into the recognition model as a test sample, and the test position and the object identification corresponding to the image output by the recognition model are obtained.
As a possible implementation manner, the relative position relationship between the test position corresponding to the acquired image output by the recognition model and the acquired image is compared, if the relative position relationship between the test position output by the model and the acquired image is matched, it is indicated that the recognition model is high in accuracy, otherwise, it is indicated that the recognition accuracy of the recognition model is poor, and the model needs to be further trained to improve the recognition accuracy of the model.
As another possible implementation manner, the test position corresponding to the acquired image output by the recognition model is compared with the relative position relationship of the acquired image, and the object identifier output by the recognition model is compared with the identifier of the object to be recognized, if the test position output by the model is matched with the relative position relationship of the acquired image, and the object identifier output by the model is also matched with the identifier of the object to be recognized, it indicates that the recognition model is high in accuracy, otherwise, it indicates that the recognition accuracy of the recognition model is not sufficient, and the model needs to be further trained, so as to improve the recognition accuracy of the model.
In the test method of the recognition model of the embodiment of the invention, in the process that the object to be recognized moves along the set track, according to the set speed and direction of the movement of the driving device, the position of the driving device on the cableway when the sensor collects the image can be calculated and determined, so that the position to which the object to be identified moves along the set track can be determined, further determining the relative position between the sensor arranged at a fixed position and the object to be recognized, inputting the acquired image containing the identification information and the relative position relation of the object to be recognized as a test sample into the recognition model to obtain the object identification and the test position output by the recognition model, determining whether the object identification is matched with the object to be recognized, and whether the relation between the test position and the relative position is matched or not is determined, and the identification accuracy of the identification model is determined, so that the test sample is not required to be manually marked, and the labor cost is reduced.
In order to implement the above embodiments, the present invention further provides a training device for recognizing a model.
Fig. 5 is a schematic structural diagram of a training apparatus for recognizing a model according to an embodiment of the present invention.
As shown in fig. 5, the apparatus includes: a control module 51, an acquisition module 52, a first labeling module 53 and a training module 54.
And the control module 51 is used for controlling the object to be identified to move along the set track.
And the acquisition module 52 is configured to control the sensor arranged at the fixed position to acquire an image of the object to be recognized during the movement of the object to be recognized along the set track.
And the first labeling module 53 is configured to label the acquired image according to the identifier of the object to be recognized.
And a training module 54 for performing model training on the recognition model by using the labeled image.
Further, in a possible implementation manner of the embodiment of the present invention, the apparatus further includes: the device comprises a first determining module, a second determining module, an obtaining module and a second labeling module.
As a possible implementation, the driving device is used for driving the object to be identified to move along the track of the cableway constraint at a set speed and direction.
The first determining module is used for determining the position of the driving device on the cableway when the sensor collects images according to the set speed and the set direction of the movement of the driving device; and determining the position to which the object to be identified moves along the set track according to the position of the driving device on the cableway.
The second determining module is used for determining the relative position relation between the sensor and the object to be identified according to the position to which the object to be identified moves along the set track when the sensor acquires the image;
and the acquisition module is used for acquiring the images acquired under various relative position relations.
And the second labeling module is used for labeling the acquired image by adopting the relative position relationship between the sensor and the object to be identified.
As a possible implementation manner, the objects to be identified are a plurality of traffic signs, including traffic signs marked with various traffic signs, and/or traffic signs in various shielding states, and/or traffic signs in various fouling states.
It should be noted that the foregoing explanation of the training method embodiment is also applicable to the apparatus of this embodiment, and is not repeated herein.
In the training device for identifying the model, in the process that the object to be identified moves along the set track, according to the set speed and the direction of the movement of the driving device, the position of the driving device on the cableway when the sensor collects the image can be calculated and determined, so that the position to which the object to be identified moves along the set track can be determined, the relative position between the sensor arranged at a fixed position and the object to be identified can be further determined, the collected image is labeled according to the relative position relation and the mark of the object to be identified in the collected image, the labeled image is used as the training sample, the relative position relation which is calculated and determined by the preset mark information of the object to be identified and the collected image is labeled, the labor is saved, the labor cost is reduced, the image labeling efficiency is improved, and a sufficient number of training samples can be provided for model training, thereby improving the accuracy of model training.
In order to implement the above embodiments, the present invention further provides a testing apparatus for identifying a model.
Fig. 6 is a schematic structural diagram of a test apparatus for identifying a model according to an embodiment of the present invention.
As shown in fig. 6, the apparatus includes: a movement module 61, a processing module 62, an input module 63 and a first testing module 64.
And the moving module 61 is used for controlling the object to be identified to move along the set track.
And the processing module 62 is configured to control the sensor arranged at the fixed position to perform image acquisition on the object to be recognized in the process that the object to be recognized moves along the set track.
And the input module 63 is configured to input the acquired image into the recognition model, so as to obtain an object identifier output by the recognition model.
The first testing module 64 is configured to test the recognition model according to whether the object identifier matches the object to be recognized.
Further, in a possible implementation manner of the embodiment of the present invention, the apparatus further includes: the device comprises a first determining module, a second determining module, an obtaining module and a second testing module.
As a possible implementation manner, the driving device is used for driving the object to be identified to move along the track of the cableway constraint at a set speed and direction.
The first determining module is used for determining the position of the driving device on the cableway when the sensor collects images according to the set speed and the set direction of the movement of the driving device; and determining the position to which the object to be identified moves along the set track according to the position of the driving device on the cableway.
And the second determining module is used for determining the relative position relation between the sensor and the object to be identified according to the position to which the object to be identified moves along the set track when the sensor acquires the image.
And the acquisition module is used for acquiring the images acquired under various relative position relations.
The second testing module is used for acquiring the testing position output by the identification model; and testing the recognition model according to whether the relative position relation of the test position is matched with that of the recognition model.
As a possible implementation manner, the objects to be identified are a plurality of traffic signs, including traffic signs marked with various traffic signs, and/or traffic signs in various shielding states, and/or traffic signs in various fouling states.
It should be noted that the foregoing explanation of the embodiment of the testing method is also applicable to the apparatus of this embodiment, and is not repeated herein.
In the test device for identifying the model, in the process that the object to be identified moves along the set track, according to the set speed and direction of the movement of the driving device, the position of the driving device on the cableway when the sensor collects the image can be calculated and determined, so that the position to which the object to be identified moves along the set track can be determined, further determining the relative position between the sensor arranged at a fixed position and the object to be recognized, inputting the acquired image containing the identification information and the relative position relation of the object to be recognized as a test sample into the recognition model to obtain the object identification and the test position output by the recognition model, determining whether the object identification is matched with the object to be recognized, and whether the relation between the test position and the relative position is matched or not is determined, and the identification accuracy of the identification model is determined, so that the test sample is not required to be manually marked, and the labor cost is reduced.
In order to implement the foregoing embodiments, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the computer device implements a training method according to the foregoing training method embodiment, or implements a testing method according to the foregoing testing method embodiment.
In order to implement the above embodiments, an embodiment of the present invention proposes a non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a training method as described in the foregoing training method embodiments, or implements a testing method as described in the foregoing testing method embodiments.
FIG. 7 illustrates a block diagram of an exemplary computer device suitable for use to implement embodiments of the present application. The computer device 12 shown in fig. 7 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present application.
As shown in FIG. 7, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Claims (14)
1. A training method for recognition models, the method comprising the steps of:
controlling an object to be identified to move along a set track; the object to be identified moves at a set speed and direction along the set track constrained by the cableway under the driving of the driving device;
in the process that the object to be recognized moves along the set track, controlling a sensor arranged at a fixed position to acquire an image of the object to be recognized;
marking the acquired image according to the identification of the object to be recognized; the identification of the object to be identified is preset;
and performing model training on the recognition model by using the marked image.
2. The training method of claim 1, wherein before performing model training on the recognition model by using the labeled image, the method further comprises:
determining the relative position relation between the sensor and the object to be identified according to the position to which the object to be identified moves along the set track when the sensor acquires the image;
and acquiring images acquired under various relative position relations.
3. The training method according to claim 2, wherein the driving device is used for driving the object to be identified to move along the track of the cableway constraint at a set speed and direction; before determining the relative position relationship between the sensor and the object to be recognized according to the position to which the object to be recognized moves along the set track when the sensor acquires the image, the method further comprises the following steps:
determining the position of the driving device on the cableway when the sensor collects images according to the set speed and the set direction of the movement of the driving device;
and determining the position to which the object to be identified moves along the set track according to the position of the driving device on the cableway.
4. A training method as claimed in claim 2, wherein before the model training of the recognition model using the labeled image, the method further comprises:
and marking the acquired image by adopting the relative position relationship between the sensor and the object to be identified.
5. Training method according to any of claims 1-4, wherein the objects to be identified are traffic signs, and the number of traffic signs is multiple, including traffic signs marked with various types of traffic signs, and/or traffic signs under various occlusion conditions, and/or traffic signs under various fouling conditions.
6. A test method for identifying a model, the method comprising the steps of:
controlling an object to be identified to move along a set track; the object to be identified moves at a set speed and direction along the set track constrained by the cableway under the driving of the driving device;
in the process that the object to be recognized moves along the set track, controlling a sensor arranged at a fixed position to acquire an image of the object to be recognized;
inputting the collected image into a recognition model to obtain an object identifier output by the recognition model;
and testing the recognition model according to whether the object identification is matched with the object to be recognized.
7. The testing method according to claim 6, wherein before inputting the collected image into the recognition model and obtaining the object identifier output by the recognition model, the method further comprises:
determining the relative position relation between the sensor and the object to be identified according to the position to which the object to be identified moves along the set track when the sensor acquires the image;
and acquiring images acquired under various relative position relations.
8. The test method according to claim 7, wherein the driving device is used for driving the object to be identified to move along the track of the cableway constraint at a set speed and direction; before determining the relative position relationship between the sensor and the object to be recognized according to the position to which the object to be recognized moves along the set track when the sensor acquires the image, the method further comprises the following steps:
determining the position of the driving device on the cableway when the sensor collects images according to the set speed and the set direction of the movement of the driving device;
and determining the position to which the object to be identified moves along the set track according to the position of the driving device on the cableway.
9. The testing method of claim 7, wherein after the step of collecting the image input recognition model, further comprising:
acquiring a test position output by the recognition model;
and testing the recognition model according to whether the relative position relation of the test position is matched with that of the recognition model.
10. The test method according to any one of claims 6 to 9, wherein the object to be identified is a plurality of traffic signs, including traffic signs marked with various types of traffic signs, and/or traffic signs in various blocking states, and/or traffic signs in various fouling states.
11. A training apparatus for recognizing a model, comprising:
the control module is used for controlling the object to be identified to move along a set track; the object to be identified moves at a set speed and direction along the set track constrained by the cableway under the driving of the driving device;
the acquisition module is used for controlling a sensor arranged at a fixed position to acquire an image of the object to be identified in the process that the object to be identified moves along the set track;
the first labeling module is used for labeling the acquired image according to the identification of the object to be recognized; the identification of the object to be identified is preset;
and the training module is used for carrying out model training on the recognition model by adopting the marked image.
12. A test apparatus for identifying a model, comprising:
the moving module is used for controlling the object to be identified to move along a set track; the object to be identified moves at a set speed and direction along the set track constrained by the cableway under the driving of the driving device;
the processing module is used for controlling a sensor arranged at a fixed position to acquire an image of the object to be identified in the process that the object to be identified moves along the set track;
the input module is used for inputting the collected image into a recognition model to obtain an object identifier output by the recognition model;
and the first testing module is used for testing the recognition model according to whether the object identification is matched with the object to be recognized.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a training method as claimed in any one of claims 1 to 5 or a testing method as claimed in any one of claims 6 to 10 when executing the program.
14. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements a training method according to any one of claims 1 to 5, or implements a testing method according to any one of claims 6 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811508096.7A CN109711285B (en) | 2018-12-11 | 2018-12-11 | Training and testing method and device for recognition model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811508096.7A CN109711285B (en) | 2018-12-11 | 2018-12-11 | Training and testing method and device for recognition model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109711285A CN109711285A (en) | 2019-05-03 |
CN109711285B true CN109711285B (en) | 2021-02-05 |
Family
ID=66256332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811508096.7A Active CN109711285B (en) | 2018-12-11 | 2018-12-11 | Training and testing method and device for recognition model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109711285B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110288629B (en) * | 2019-06-24 | 2021-07-06 | 湖北亿咖通科技有限公司 | Target detection automatic labeling method and device based on moving object detection |
CN110490089B (en) * | 2019-07-29 | 2023-04-07 | 四川省视频电子有限责任公司 | Image identification method of satellite receiving equipment |
CN112987707A (en) * | 2019-11-29 | 2021-06-18 | 北京京东乾石科技有限公司 | Automatic driving control method and device for vehicle |
CN111325292B (en) * | 2020-03-11 | 2023-05-02 | 中国电子工程设计院有限公司 | Object behavior recognition method and device |
CN111862144A (en) * | 2020-07-01 | 2020-10-30 | 睿视智觉(厦门)科技有限公司 | Method and device for determining object movement track fraction |
CN112200217B (en) * | 2020-09-09 | 2023-06-09 | 天津津航技术物理研究所 | Identification algorithm evaluation method and system based on infrared image big data |
CN113312442B (en) * | 2021-07-30 | 2021-11-09 | 景网技术有限公司 | Smart city electronic map generation method and system |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105719499B (en) * | 2016-04-21 | 2018-06-01 | 百度在线网络技术(北京)有限公司 | Traffic Sign Recognition test method and device |
CN105957145A (en) * | 2016-04-29 | 2016-09-21 | 百度在线网络技术(北京)有限公司 | Road barrier identification method and device |
CN107577981A (en) * | 2016-07-04 | 2018-01-12 | 高德信息技术有限公司 | A kind of road traffic index identification method and device |
US10417788B2 (en) * | 2016-09-21 | 2019-09-17 | Realize, Inc. | Anomaly detection in volumetric medical images using sequential convolutional and recurrent neural networks |
US10402690B2 (en) * | 2016-11-07 | 2019-09-03 | Nec Corporation | System and method for learning random-walk label propagation for weakly-supervised semantic segmentation |
US20180136332A1 (en) * | 2016-11-15 | 2018-05-17 | Wheego Electric Cars, Inc. | Method and system to annotate objects and determine distances to objects in an image |
CN107451526A (en) * | 2017-06-09 | 2017-12-08 | 蔚来汽车有限公司 | The structure of map and its application |
CN108776808A (en) * | 2018-05-25 | 2018-11-09 | 北京百度网讯科技有限公司 | A kind of method and apparatus for detecting ladle corrosion defect |
CN108764365A (en) * | 2018-06-06 | 2018-11-06 | 国网福建省电力有限公司厦门供电公司 | A kind of device signboard detection method |
CN109376664B (en) * | 2018-10-29 | 2021-03-09 | 百度在线网络技术(北京)有限公司 | Machine learning training method, device, server and medium |
-
2018
- 2018-12-11 CN CN201811508096.7A patent/CN109711285B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109711285A (en) | 2019-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109711285B (en) | Training and testing method and device for recognition model | |
CN107153363B (en) | Simulation test method, device, equipment and readable medium for unmanned vehicle | |
CN109740469B (en) | Lane line detection method, lane line detection device, computer device, and storage medium | |
CN109637151B (en) | Method for identifying illegal driving of emergency lane on highway | |
CN103359020B (en) | A kind of motor vehicle driving training or examination method for supervising and system | |
CN107766872B (en) | Method and device for identifying illumination driving scene | |
CN110647886A (en) | Interest point marking method and device, computer equipment and storage medium | |
CN110675637A (en) | Vehicle illegal video processing method and device, computer equipment and storage medium | |
CN114913197B (en) | Vehicle track prediction method and device, electronic equipment and storage medium | |
CN110084230B (en) | Image-based vehicle body direction detection method and device | |
CN110599853A (en) | Intelligent teaching system and method for driving school | |
CN110111018B (en) | Method, device, electronic equipment and storage medium for evaluating vehicle sensing capability | |
CN110986994B (en) | Automatic lane change intention marking method based on high-noise vehicle track data | |
CN109903308B (en) | Method and device for acquiring information | |
CN111967451B (en) | Road congestion detection method and device | |
CN106355329A (en) | Method and system for testing sign aligning ability of driver | |
CN113221894A (en) | License plate number identification method and device of vehicle, electronic equipment and storage medium | |
CN111353273A (en) | Radar data labeling method, device, equipment and storage medium | |
CN114693722B (en) | Vehicle driving behavior detection method, detection device and detection equipment | |
CN113095345A (en) | Data matching method and device and data processing equipment | |
CN116092048A (en) | Image recognition method and device suitable for vehicle-mounted equipment | |
CN110189242A (en) | Image processing method and device | |
CN115762153A (en) | Method and device for detecting backing up | |
CN111126336B (en) | Sample collection method, device and equipment | |
CN115205824A (en) | Object detection method, computer device, computer-readable storage medium, and vehicle |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211011 Address after: 105 / F, building 1, No. 10, Shangdi 10th Street, Haidian District, Beijing 100085 Patentee after: Apollo Intelligent Technology (Beijing) Co.,Ltd. Address before: 100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing Patentee before: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) Co.,Ltd. |
|
TR01 | Transfer of patent right |