Export training data

Let me say a few words about datasets export capabilities before we start. When we design neural network we think about it in terms of computational graph. This is the core abstraction behind popular deep learning frameworks. Computational graph consists of math operations and variables.

We developed the powerful dataset export tool that opens up the possibility to configure export with computational graphs. We can define the sequence of operations that will be applied to each image from selected datasets.

Just click “Export” tab in main menu and paste json configuration (presented below) to the text box.

[

{

"dst": "$sample01",

"src": [

"Anpr tutorial/artificial"

],

"action": "data",

"settings": {

"classes_mapping": {

"Licence plate": "plate"

}

}

},

{

"dst": "$sample_bb",

"src": [

"$sample01"

],

"action": "bbox",

"settings": {

"classes_mapping": {

"plate": "plate_bbox"

}

}

},

{

"dst": [

"$sample_train",

"$sample_test"

],

"src": [

"$sample_bb"

],

"action": "if",

"settings": {

"condition": {

"probability": 0.98

}

}

},

{

"dst": "$train_tagged",

"src": [

"$sample_train"

],

"action": "tag",

"settings": {

"tag": "train",

"action": "add"

}

},

{

"dst": "$test_tagged",

"src": [

"$sample_test"

],

"action": "tag",

"settings": {

"tag": "test",

"action": "add"

}

},

{

"dst": "artificial_samples",

"src": [

"$train_tagged",

"$test_tagged"

],

"action": "save",

"settings": {

"images": true,

"annotations": true

}

}

]

And the system will automatically generate such diagram on the right side:

Let’s take a look at our example. Blue boxes are data variables, purple boxes are operations. Detailed explanation of all available export layers you can find here.

In this example we take images from dataset “artificial” from project “Anpr tutorial”. All annotations for this dataset are polygons so i would like to convert them to bounding boxes. In this case it is not so important, but in other tutorials it will be very useful when, for example, we export bounding boxes around cars and pedestrians from Cityscapes dataset (all annotations are presented as polygons).

Then we split dataset to train and test. Each image falls into the training set with probability of 98%. After that all train images will be saved with tags “test”, all test images — with tag “test”.

Well, let’s click “Start Exporting” button. You will be redirected to the page with exports tasks. Wait a few seconds until the task “artificial_samples” is completed.