Summary of all reports

Number of reports: {{ num_reports }}

{% if cer_avg and wer_avg -%}

Metrics

Average CER: {{ cer_avg|round(4) }}

Average WER: {{ wer_avg|round(4) }}

{% endif %} {%- if diff_c and diff_w %} {%- set sections = [{'title': 'Found differences (character)', 'data': diff_c}, {'title': 'Found differences (word)', 'data': diff_w}] %}
{%- for section in sections %}

{{ section['title'] }}

{%- set num_omitted = namespace(value=0) -%} {% for gt_ocr, occurrences in section['data'].items() -%} {% if occurrences < occurrences_threshold -%} {%- set num_omitted.value = num_omitted.value + 1 %} {%- else -%} {%- set gt = gt_ocr.split(" :: ")[0] %} {%- set ocr = gt_ocr.split(" :: ")[1] %} {# display the unicode character #} {%- endif %} {%- endfor %} {% if num_omitted.value > 0 and occurrences_threshold > 1 -%}

Skipped {{ num_omitted.value }} diffs with fewer than {{ occurrences_threshold }} occurrences. The complete list of diffs is available in the accompanying JSON file.

{%- set num_omitted.value = 0 %} {%- endif %}
GTOCROccurrences
{{ gt }}{{ ocr }} {{ occurrences }}
{%- endfor %}
{%- endif %}