-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: SPICE download and logging setup.
- Loading branch information
Showing
5 changed files
with
98 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Audio Captioning metrics package. | ||
"""Metrics for evaluating Automated Audio Captioning systems, designed for PyTorch. | ||
""" | ||
|
||
__name__ = "aac-metrics" | ||
__author__ = "Etienne Labbé (Labbeti)" | ||
__author_email__ = "[email protected]" | ||
__license__ = "MIT" | ||
__maintainer__ = "Etienne Labbé (Labbeti)" | ||
__status__ = "Development" | ||
__version__ = "0.4.5" | ||
|
||
|
||
from .classes.base import AACMetric | ||
from .classes.bleu import BLEU | ||
|
@@ -31,35 +23,24 @@ | |
set_default_java_path, | ||
set_default_tmp_path, | ||
) | ||
from . import download, eval, info | ||
|
||
|
||
__all__ = [ | ||
"BLEU", | ||
"CIDErD", | ||
"DCASE2023Evaluate", | ||
"FENSE", | ||
"METEOR", | ||
"ROUGEL", | ||
"SPICE", | ||
"SPIDEr", | ||
"dcase2023_evaluate", | ||
"evaluate", | ||
"get_default_cache_path", | ||
"get_default_java_path", | ||
"get_default_tmp_path", | ||
"set_default_cache_path", | ||
"set_default_java_path", | ||
"set_default_tmp_path", | ||
"load_metric", | ||
] | ||
__name__ = "aac-metrics" | ||
__author__ = "Etienne Labbé (Labbeti)" | ||
__author_email__ = "[email protected]" | ||
__license__ = "MIT" | ||
__maintainer__ = "Etienne Labbé (Labbeti)" | ||
__status__ = "Development" | ||
__version__ = "0.4.5" | ||
|
||
|
||
def load_metric(name: str, **kwargs) -> AACMetric: | ||
"""Load a metric class by name. | ||
:param name: The name of the metric. | ||
Must be one of ("bleu_1", "bleu_2", "bleu_3", "bleu_4", "meteor", "rouge_l", "cider_d", "spice", "spider", "fense"). | ||
:param **kwargs: The keyword optional arguments passed to the metric. | ||
:param **kwargs: The keyword optional arguments passed to the metric factory. | ||
:returns: The Metric object built. | ||
""" | ||
name = name.lower().strip() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.