Few updates are requred to ketos tutorial
following issues were noticed while following tutorial using ketos 2.6
Creating a training database (Basic)
In [7]:
- ketos.data_handling.selection_table.standardize() arguments (signal_labels, backgr_labels) have been changed in ketos 2.6
- ketos.data_handling.selection_table.standardize() argument 'mapper' key and value are required to swap
Suggestion: In [7]
map_to_ketos_annot_std ={'filename':'sound_file'}
std_annot_train = sl.standardize(table=annot_train, labels=[1], start_labels_at_1=True,
mapper=map_to_ketos_annot_std, trim_table=True)
std_annot_val = sl.standardize(table=annot_val, labels=[1], start_labels_at_1=True,
mapper=map_to_ketos_annot_std, trim_table=True)
Creating a training database (Extended)
In [8]: (same issue as tutorial 1, In[7])
-
ketos.data_handling.selection_table.standardize() arguments (signal_labels, backgr_labels) have been changed in ketos 2.6
-
ketos.data_handling.selection_table.standardize() argument 'mapper' key and value are required to swap
Suggestion: In [8]
map_to_ketos_annot_std ={'filename':'sound_file'}
std_annot_train = sl.standardize(table=annot_train, labels=["upcall"], start_labels_at_1=True,
mapper=map_to_ketos_annot_std, trim_table=True)
std_annot_test = sl.standardize(table=annot_test, labels=["upcall"], start_labels_at_1=True,
mapper=map_to_ketos_annot_std, trim_table=True)
In 14:
positives_train = sl.select(annotations=std_annot_train, length=3.0, step=0.5, min_overlap=0.5, center=False)
take forever to run. (jupyter notebook crash)
In 19, 21, and 22:
pandas future warning pandas.append
warning message:
/.../lib/python3.8/site-packages/ketos/data_handling/selection_table.py:1033: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. df = df.append(z, ignore_index=True)
detector.py
line 97
- arguments of
load_model_file
are requred to changed - method
load_model_file
will be removed in future versions, better to replace withload
method
Old: Line 97
model, audio_repr = ResNetInterface.load_model_file(args.model, './narw_tmp_folder', load_audio_repr=True)
Suggestion:
`model, audio_repr = ResNetInterface.load(model_file='narw.kt', new_model_folder='./narw_tmp_folder', load_audio_repr=True)`