def finalizeMetrics(cummulated_metrics):
    """
    Compute mean of cummulated metrics
    :param cummulated_metrics: cummulated metrics not yet taken their mean
    :return: metrics with mean computed
    """
    metrics = {'count': 0, 'cost': 0, 'matched_head_ratio': 0.0, 'matched_person_ratio': 0.0,
               'matched_object_ratio': 0.0, 'match': 0.0, 'cover_ratio': 0.0}
    count = cummulated_metrics['count']
    metrics['count'] = count
    metrics['cover_ratio'] = cummulated_metrics['cover_ratio']/float(count)
    metrics['cost'] = cummulated_metrics['cost']/float(count)
    metrics['match'] = cummulated_metrics['match']/float(count)
    metrics['matched_head_ratio'] = cummulated_metrics['matched_head_ratio']/float(count)
    metrics['matched_person_ratio'] = cummulated_metrics['matched_person_ratio']/float(count)
    metrics['matched_object_ratio'] = cummulated_metrics['matched_object_ratio']/float(count)
    return metrics