Skip to content

ENH: Add implementation of AVA method for segmenting mouse USVs #46

Closed

Description

@NickleDave

We should add some version of the algorithm that AVA uses to segment mouse USVs from audio

as the algorithm is being used in papers, e.g. from @nickjourjine
https://github.com/nickjourjine/peromyscus-pup-vocal-evolution/blob/1104538121316fa58b69f337f3e28e453f738c58/src/segmentation.py#L21
and from @ralphpeterson, see https://www.biorxiv.org/content/10.1101/2023.03https://research.repository.duke.edu/concern/datasets/9k41zf38g?locale=en.11.532197v1.full.pdf
but with the addition of the use of spectral flatness to filter vocalizations from non-vocalizations, see here (and relevant citations in paper we should include in a References section of docstring):
https://github.com/ralphpeterson/gerbil-vocal-dialects/blob/main/vocalization_segmenting.py
See also the paper for their parameters

As part of #40 and originally discussed in #5 -- note this is already in progress in https://github.com/vocalpy/vocalpy/tree/add-segment-module but I'm breaking out each algorithm as separate issues, like here. (I will probably rename the branch something to add-ava-segmenter)

We should

  • implement
    • Seeing again that it has been used by at least 3 papers I think I should undo some of the changes I made and provide just a slightly cleaned up version that preserves the behavior of the original, and name it something like ava_segmenter
    • default parameters should be those from that example script
    • would be nice to also provide Ralph's params as a dataclass that could be pass in by converting to a dict and unpacking with the ** operator
  • also include a tutorial that walks through the algorithm step-by-step

Activity

  1. added
    ENH: enhancement
    Segmentation
    on Sep 12, 2023
  2. self-assigned this
    on Sep 12, 2023
  3. NickleDave commented on Sep 21, 2023

    @NickleDave
    ContributorAuthor

    This was added in #53 , still need to add a demo in the docs (as in #52)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ENH: enhancementSegmentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions