dcase_util.tools.SubmissionChecker
- class dcase_util.tools.SubmissionChecker(entry_label, mode='submission', class_labels=None, file_count=None, task='ASC', allow_placeholder_lines_in_output=False, allowed_empty_fields_in_meta=None, output_file_header=False, output_file_fields=None)[source]
Submission meta data and system output checker class
Constructor
- Parameters
- entry_labelstr
Entry label
- modestr
Checker mode [submission, processed]
- class_labelslist of str
Class labels
- file_countint
Correct mount of unique files in the system output
- taskstr
Task label [ASC, SED, TAG]
- allow_placeholder_lines_in_outputbool
Allow placeholder lines in the output, in case of sound event system output only audio file is outputted if no sound events were detected for the file.
- output_file_headerbool
System output has header Default value False
- output_file_fieldslist of str
System output fields
- __init__(entry_label, mode='submission', class_labels=None, file_count=None, task='ASC', allow_placeholder_lines_in_output=False, allowed_empty_fields_in_meta=None, output_file_header=False, output_file_fields=None)[source]
Constructor
- Parameters
- entry_labelstr
Entry label
- modestr
Checker mode [submission, processed]
- class_labelslist of str
Class labels
- file_countint
Correct mount of unique files in the system output
- taskstr
Task label [ASC, SED, TAG]
- allow_placeholder_lines_in_outputbool
Allow placeholder lines in the output, in case of sound event system output only audio file is outputted if no sound events were detected for the file.
- output_file_headerbool
System output has header Default value False
- output_file_fieldslist of str
System output fields
Methods
__init__(entry_label[, mode, class_labels, ...])Constructor
delimiter([exclude_delimiters])Use csv.sniffer to guess delimiter for CSV file
detect_file_format([filename])Detect file format from extension
empty()Check if file is empty
exists()Checks that file exists
get_file_information()Get file information, filename
is_package([filename])Determine if the file is compressed package.
load([filename])Load file
log([level])Log container content
process([entry_meta_filename, ...])Process submission entry and apply all check-ups
save([filename])Save file
show([mode, indent, visualize])Print container content
to_html([indent])Get container information in a HTML formatted string
to_string([ui, indent])Get container information in a string
validate_format()Validate file format
Attributes
bytesFile size in bytes
loggerLogger instance
md5Checksum for file.
valid_formatsValid file formats