There is a minor issue with sed_scores_from_sebbs in sebbs/utils.py that results in an incorrect fill_value when passing a dictionary of SEBBs:
The recursive call here:
if isinstance(sebbs, dict):
return {
key: sed_scores_from_sebbs(
preds_for_key, sound_classes, audio_duration[key] if audio_duration is not None else None
)
for key, preds_for_key in sebbs.items()
}
results in fill_value being set to -np.inf.
Here is a minimal example:
from sebbs.utils import sed_scores_from_sebbs
csebbs_out = {'asd': [(0, 1, 'Dog', 0.01)]}
result = sed_scores_from_sebbs(csebbs_out, sound_classes=c, fill_value=0.0)
print(result)
A fix could look somewhat like this:
if isinstance(sebbs, dict):
return {
key: sed_scores_from_sebbs(
preds_for_key, sound_classes, audio_duration[key] if audio_duration is not None else None, fill_value
)
for key, preds_for_key in sebbs.items()
}
Hey,
thanks for making your work available!
There is a minor issue with
sed_scores_from_sebbs
insebbs/utils.py
that results in an incorrectfill_value
when passing a dictionary of SEBBs:The recursive call here:
results in
fill_value
being set to-np.inf
.Here is a minimal example:
A fix could look somewhat like this:
Best, Paul