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 inplace 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:

annotation_conversion:
# 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:

has_background - allows convert dataset with/without adding background_label. Accepted values are True or False. (default is True)