Skip to content

Commit c891141

Browse files
committed
documentation on the segment collection mode
1 parent b36e6ed commit c891141

3 files changed

Lines changed: 39 additions & 6 deletions

File tree

docs/best-practices/segment-review.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@ Setting Parameters
3535

3636
The GUI and command line tool allow you to set various parameters to customize the segment extraction process:
3737

38-
* **Minimum Confidence** (``min_conf``): Set a minimum confidence value for predictions to be considered. It is recommended to determine the threshold by reviewing precision and recall.
38+
* **Minimum Confidence** (``min_conf``): Set a minimum confidence value for predictions to be considered.
39+
* **Maximum Confidence** (``max_conf``): Set a maximum confidence value for predictions to be considered.
3940
* **Maximum Number of Segments** (``num_seq``): Specify how many segments per species should be extracted.
4041
* **Audio Speed** (``audio_speed``): Adjust the playback speed. Extracted segments will be saved with the adjusted speed (e.g., to listen to ultrasonic calls).
4142
* **Segment Length** (``seq_length``): Define how long the extracted audio segments should be. If you set to more than 3 seconds, each segment will be padded with audio from the source recording. For example, for 5-second segment length, 1 second of audio before and after each extracted segment will be included. For 7 seconds, 2 seconds will be included, and so on. The first and last segment of each audio file might be shorter than the specified length.
42-
43-
.. note::
44-
45-
The desired minimum confidence value can be different for each species.
43+
* **Segment Collection Mode** (``collection_mode``): Choose how segments are selected. Following options are available:
44+
45+
* **random**: Select segments randomly.
46+
* **confidence**: Select segments based on confidence values, starting with the highest confidence scores.
47+
* **balanced**: Select segments equally distributed across confidence values.
48+
* :doc:`More details on segment collection modes <../implementation-details/segment-collection-mode>`
4649

4750
Extracting Segments
4851
-------------------

docs/implementation-details.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ Implementation details
44
.. toctree::
55
:maxdepth: 1
66

7-
implementation-details/crop-modes
7+
implementation-details/crop-modes
8+
implementation-details/segment-collection-mode
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Segment Collection Modes
2+
===============================
3+
4+
This page describes the different segment collection modes available for the segment-extraction feature in the BirdNET-Analyzer.
5+
In general the segments feature collects all detections from the provided result files according to the specified confidence range.
6+
Then segments are selected for each species up to the specified maximum number segments.
7+
If there are more detections than the maximum for a species, the segment collection mode gives you control over which segments are selected.
8+
The goal of this is to get a more representative set of segments to use in the review feature or to get only high confidence segments to use as training data.
9+
The following segment collection modes are available:
10+
11+
1. Random
12+
----------------
13+
14+
This mode will select segments randomly from the detections that are within the specified confidence range.
15+
Therefore it will mirror the distribution of the confidence values in the detections.
16+
17+
2. Confidence
18+
----------------
19+
20+
This mode will select segments based on confidence values, starting with the highest confidence scores.
21+
22+
3. Balanced
23+
----------------
24+
25+
This mode will select segments equally distributed across the specified confidence range.
26+
In more detail, we divide the confidence range into a specified number of bins (10 by default) and sort the detections into them.
27+
Then total number of segments is divided by the number of bins to get the maximum number of segments per bin.
28+
Finally for each bin we randomly select the up to the maximum number of segments from each bin.
29+
Due to rounding and the distribution of confidence values, the total number of segments might be less than the specified maximum even if there are more segments available.

0 commit comments

Comments
 (0)