Annotation Converters

Annotation converter is a function which converts annotation file to suitable for metric evaluation format. Each annotation converter expects specific annotation file format or data structure, which depends on original dataset. If converter for your data format is not supported by Accuracy Checker, you can provide your own annotation converter. Each annotation converter has parameters available for configuration.

Process of conversion can be implemented in two ways:

Describing Annotation Conversion in Configuration File

Annotation conversion can be provided in dataset section your configuration file to convert annotation in-place before every evaluation. Each conversion configuration should contain converter field filled selected converter name and provide converter specific parameters (more details in supported converters section). All paths can be prefixed via command line with -s, --source argument.

You can additionally use optional parameters like:

Example of usage:

# Converter name which will be called for conversion.
converter: sample
# Converter specific parameters, can be different depend on converter realization.
data_dir: sample/sample_dataset
# (Optional) subsample generation. Can be also used with prepared annotation file.
subsample_size: 1000
# (Optional) paths to store annotation files for following usage. In the next evaluation these files will be directly used instead running conversion.
annotation: sample_dataset.pickle
dataset_meta: sample_dataset.json

Conversing Process via Command Line

The command line for annotation conversion looks like:

convert_annotation <converter_name> <converter_specific parameters>

All converter specific options should have format --<parameter_name> <parameter_value> You may refer to -h, --help to full list of command line options. Some optional arguments are:

Supported Converters

Accuracy Checker supports following list of annotation converters and specific for them parameters:

Customizing Dataset Meta

There are situations when we need customize some default dataset parameters (e.g. replace original dataset label map with own.) You are able to overload parameters such as label_map, segmentation_colors, backgound_label using dataset_meta_file argument. dataset meta file is JSON file, which can contains following parameters: