PyHa
PyHa copied to clipboard
Visualize multiple categories
Closes #135
These changes allow the visualize_spectrogram
function to graph multiple different categories, assigning each category a different label and color. All actual changes are done in the spectrogram_graph
function, since visualize_spectrogram
just calls that to draw the final graph. If there are more than six categories, colors will start being re-used.
Tested using a modified version of the Screaming Piha test dataset provided on here. Here are some results from different calls of the function, to make sure my changes matched the intended results:
spectrogram_visualization(clip_path, premade_annotations_df = manual_df[manual_df["IN FILE"] == "ScreamingPiha2.wav"],premade_annotations_label = "Piha Human Labels")
spectrogram_visualization(clip_path,automated_df = True, isolation_parameters = isolation_parameters)
spectrogram_visualization(clip_path,automated_df = True,isolation_parameters=isolation_parameters,premade_annotations_df = manual_df[manual_df["IN FILE"] == "ScreamingPiha2.wav"])