You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we want to have an explicit module vocalpy.segment that further contains methods grouped by the schema of Kemp et al 2000: energy-based methods, metric-based methods, and model-based methods
Energy-based methods can be further split into audio and spectrogram
audio will be: amplitude threshold + audio method from Koe
endpoint_detection, AKA Rabiner-Sambur algorithm
whatever evsonganaly uses -- is there a name? amplitude_threshold
The thing is that no schema for categorizing segmenting methods works perfectly, since people often use some sort of "hybrid" approach.
I wonder if we could have a sklearn-like pipeline API where you build a segmenting pipeline, to allow this hybrid approach.
I'm thinking of this block diagram from Lamel et al. 76 (Rabiner is one of the authors)
Here their "implicit" is what I think Kemp et al 2000 would call "model-based".
bounding boxes, as typically used in bioacoustics applications like Passive Acoustic Monitoring
At least internal to vocalpy, it feels like we should group the code into line_segment and bounding_box sub-packages. So you'd have vocalpy.segment.line_segment and vocalpy.segment.bounding_box. Then we should import all algorithms at the segment level for easy access, and to avoid the need to write voc.segment.segment.audio_amplitude or voc.segment.line_segment.audio_amplitude
Those names are already pretty verbose even before you add the algorithm names to them, and they'd get even more verbose if you added another level of the hierarchy for method/model type.
I also want to just call the sub-package segment for brevity but then this ends up duplicating the word segment (used as a verb) and the word segment (used as a noun).
Ok, how about this: voc.segment.line.algorithm_name, and voc.segment.box.algorithm_name.
Then the algorithm should either return a LineSegment or a Box; we will be fiercely pedantic geometers when we segment.
I'm gonna go with this for now.
Activity
NickleDave commentedon Aug 20, 2023
The thing is that no schema for categorizing segmenting methods works perfectly, since people often use some sort of "hybrid" approach.
I wonder if we could have a

sklearn-likepipelineAPI where you build a segmenting pipeline, to allow this hybrid approach.I'm thinking of this block diagram from Lamel et al. 76 (Rabiner is one of the authors)
Here their "implicit" is what I think Kemp et al 2000 would call "model-based".
NickleDave commentedon Sep 3, 2023
Note that we already did have
vocalpy.signal.segmentand I plan to use that module, just convert it into a sub-package in the code baseNickleDave commentedon Sep 18, 2023
Another follow up:
We basically have two possible outputs:
At least internal to vocalpy, it feels like we should group the code into
line_segmentandbounding_boxsub-packages. So you'd havevocalpy.segment.line_segmentandvocalpy.segment.bounding_box. Then we should import all algorithms at thesegmentlevel for easy access, and to avoid the need to writevoc.segment.segment.audio_amplitudeorvoc.segment.line_segment.audio_amplitudeThose names are already pretty verbose even before you add the algorithm names to them, and they'd get even more verbose if you added another level of the hierarchy for method/model type.
I also want to just call the sub-package
segmentfor brevity but then this ends up duplicating the wordsegment(used as a verb) and the wordsegment(used as a noun).Ok, how about this:
voc.segment.line.algorithm_name, andvoc.segment.box.algorithm_name.Then the algorithm should either return a
LineSegmentor aBox; we will be fiercely pedantic geometers when we segment.I'm gonna go with this for now.