-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualize multiple categories #146
base: main
Are you sure you want to change the base?
Conversation
Great work so far! I have a couple changes I'd like to see:
|
Currently, the colors can still change between each function call/different data sets. Is this the desired behavior, or should I make label colors persistent consistent throughout the entire program? |
It'd be great if they were consistent throughout the whole program. |
Commit 468cb4b is misnamed, that one is a large refactoring that changes spectrogram visualization to take a dataframe as input. |
Once these changes are approved, I'll modify the tutorial notebook to properly call the new functions |
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 thespectrogram_graph
function, sincevisualize_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"])