Datasets¶

Hierarchy¶

Data in CN24 is managed in a three-level hierachy:

1. Areas designate the data’s experimental purpose. There are 3 default areas: training, staging and testing.
2. Bundles are the default unit of dataset serialization. They can be moved freely between areas. Bundles in the training Area can be assigned a weight that influences the likelihood of selecting training samples from them.
3. Segments contain the samples themselves. They can be moved freely between Bundles. They exist to group samples, e.g., training and validation samples or samples of different classes.

CN24 will create two empty default Bundles: Default_Training and Default_Testing

    Area                        Bundle                       Segment   Samples
Training
|..............Default_Training                                      95
|..................Weight:    1

Staging
|.......................UM_lane        95

Testing
|...............Default_Testing                                      96


Data Format¶

Data is provided to CN24 in the form of serialized Bundles. The serialization method of choice is JSON, provided by nlohnmann’s JSON library.

The Bundle format is best explained by an example:

{
"name": "SampleBundle",
"segments:" [
{
"name": "SampleSegmentA",
"samples": [ ]
},
{
"name": "SampleSegmentB",
"samples": [ ]
}
]
}


The samples themselves are JSON objects as well. Their exact schema depends on the task.

Detection¶

CN24 supports detection using the YOLO method. Samples need to specify the following:

• image_filename: Input image file
• boxes: JSON array of bounding boxes

Bounding boxes have the following properties:

• x, y: Coordinates of the center of the bounding box (pixels)
• w, h: Width and height of the bounding box (pixels)
• class: Class of the object inside the bounding box

Optionally, you can specificy these:

• difficult: If set to 1, the box is ignored during testing
• dont_scale: Instead of pixels, the coordinates and dimensions of the box are specified as normalized fractions of the image dimensions

The following is an example from the PASCAL VOC dataset:

{
"boxes": [
{
"class": "bird",
"difficult": 0,
"h": 286,
"w": 156,
"x": 338,
"y": 190
}
],
"image_filename": "2011_003213.jpg"
}


Binary Segmentation¶

Samples for binary segmentation consist of two image files with equal dimensions. One is the actual input image and the other the label image. At the moment, only binary segmentation is supported. Grayscale label images are preferred. However, CN24 will also accept RGB images as labels. In this case, the value of the third channel will be used as a label.

The following properties need to be specified:

• image_filename: Input image file
• label_filename: Label file

Optionally, you can supply a value for localized_error_function. Currently, the only supported values are default and kitti.

The following is an example from the KITTI-Vision Road Dataset:

{