Currently vak.predict.frame_classification saves an output csv where we infer the annotated audio file from the name of the "frames path", the array file that contains the input frames to the model.
This has a couple of drawbacks:
If there's no annotations for one of the frame paths, because the model does not predict any (non-background) segments (as in #393), then the frames path doesn't appear in the predicted annotations
the inferred audio file name can be wrong, if we change the frames path name (e.g. for CMACBench experiments where we have multiple frames file derived from the same audio file, and we give those frames paths different names based on some condition like spectrogram parameters or what group appears in the dataset). This means we will end up inferring some notated_path that is an audio filename that doesn't exist
So instead we should somehow track the exact frames path used for a prediction, and
I think what would be extra nice here would be to save a new csv file that just adds columns to the splits_csv_path dataset, so that way we carry along any metadata we might have added as columsn in the splits_csv_path (e.g., species, animal ID, some other arbitrary group like "unit" or "song") that we can use for downstream analysis. We're most of the way to this already since we iterate over the "frames_path" column when we generate predictions.
Eventually we should do this for other predict functions as well, although not sure what it will look like there if we're not still using "frames_path"
Currently
vak.predict.frame_classification
saves an output csv where we infer the annotated audio file from the name of the "frames path", the array file that contains the input frames to the model.This has a couple of drawbacks:
notated_path
that is an audio filename that doesn't existSo instead we should somehow track the exact frames path used for a prediction, and I think what would be extra nice here would be to save a new csv file that just adds columns to the
splits_csv_path
dataset, so that way we carry along any metadata we might have added as columsn in thesplits_csv_path
(e.g., species, animal ID, some other arbitrary group like "unit" or "song") that we can use for downstream analysis. We're most of the way to this already since we iterate over the "frames_path" column when we generate predictions.Eventually we should do this for other
predict
functions as well, although not sure what it will look like there if we're not still using "frames_path"