Add a Vehicle Model to a Database (Using a Single Action)
You can train Media Server to recognize a vehicle model by sending a single action (TrainVehicleModel
).
Running this action is equivalent to running the following actions in the following order:
NewVehicleModel
AddVehicleModelImages
AddVehicleModelMetadata
(optional)BuildVehicleModel
The TrainVehicleModel
action is atomic, so that any interruption to the server does not leave the database in an inconsistent state.
Alternatively, you can train Media Server by sending these actions individually. For more information about how to do this, see Add a Vehicle Model to a Database (Using Separate Steps).
To add a vehicle model to a database (using a single action)
-
Add a vehicle model using the TrainVehicleModel action. For example:
curl http://localhost:14000/action=TrainVehicleModel -F database=Cars -F identifier=FordFocus -F vehiclemake=Ford -F imagedata=@ford-focus.png -F metadata=type:hatchback -F anprlocations=DE
Alternatively, the following example provides the path of the training image rather than sending the image data:
curl http://localhost:14000/action=TrainVehicleModel -F database=Cars -F identifier=FordFocus -F vehiclemake=Ford -F imagepath=./images/ford-focus.png -F metadata=type:hatchback -F anprlocations=DE
Media Server adds the vehicle model to the database and returns the identifier.