PyHa icon indicating copy to clipboard operation
PyHa copied to clipboard

Visualize multiple categories

Open mbazzani opened this issue 1 year ago • 6 comments

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") image

spectrogram_visualization(clip_path,automated_df = True, isolation_parameters = isolation_parameters) image

spectrogram_visualization(clip_path,automated_df = True,isolation_parameters=isolation_parameters,premade_annotations_df = manual_df[manual_df["IN FILE"] == "ScreamingPiha2.wav"]) image

mbazzani avatar Dec 15 '22 13:12 mbazzani