VisualRecogTrain

Creates or replaces a Visual Recognition Classifier.

Syntax

bool VisualRecogTrain (string ZIPDirectory, string Name, string deleteExisting)

Parameters

string ZIPDirectory - Directory where this action stores the zip file with the training data. The zip file has the name of the classifier. This parameter supports Smart Parameters.

string Name - Name to give the classifier. This name is used when you later try to classify a page. This parameter supports Smart Parameters.

string deleteExisting - Delete the classifier of the same name if it exists. If this flag is set to true, it deletes the classifier of the same name, if it exists. If this flag is set to false and a classifier with the same name exists, this action adds the training data to the existing classifier. This parameter supports SmartParameters. The type of this parameter is string only to support SmartParameters. Internally, it is treated as a boolean. Specify '1' for true and '0' for false. Any other value is ignored and the action is default to false.

Returns

True, action is successful. Otherwise, False.

Level

Batch level.

Details

This action creates or replaces a Visual Recognition Classifier. Pages of the batch are used as the training data. It is expected that the batch is in a certain format. In particular, the batch needs to be divided into set documents, where the 'Type' associated with the document is class that is created in the Visual Recognition Service. All of pages in that document are treated as training data for that class. So, for example, if you wanted to train the classifier to recognize the main page and the trailing pages of a mortgage application, you would create a batch with two documents: Main_Page and Trailing_Page. Put all of the training page for the main page under the Main_Page document and the trailing pages under Trailing_Page document.

Example
VisualRecogSetURL("@APPVAR(values/gen/url)")
VisualRecogSetCredentials("@APPVAR(values/adv/VRAPIKey)") 
VisualRecogTrain("@APPPATH(runtime)+\+..+\+ZIP","@APPVAR(values/gen/VRClassifierName)",1)