Skip to content
intermediateaudio

Powdermill Bird Soundscape Species Boxes on Spectrograms

Correct time-frequency boxes with species codes on ten real dawn-chorus excerpts, using Raven selection tables as pre-annotations and torchvision-detect.

Get This Design

View on GitHub(opens in a new tab)

Clone or download from the repository

Quick start:

bash
git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/audio/bioacoustics/powdermill-bird-soundscape-boxes
potato start config.yaml

About this dataset

The dataset holds 385 minutes of dawn-chorus recordings made with AudioMoth recorders at Powdermill Nature Reserve in Pennsylvania from April through July 2018, split into five-minute segments. Lauren Chronister, Tessa Rhinehart, Aidan Place, and Justin Kitzes released 16,052 boxes covering 48 bird species under a CC0 license, with a time span, a frequency span, and a species code for each sound.

In the original protocol, one annotator drew boxes on spectrograms in Raven Pro and identified the species. A second annotator then identified species from the boxed spectrograms without seeing the first labels and flagged problem boxes, and a third annotator settled discrepancies. The design starts from the finished boxes. Ten real 10-second excerpts load with the excerpts' own boxes as pre-annotations, so annotators move, resize, relabel, delete, or add boxes on the spectrogram. The label set is reduced to the eight species with the most boxes (EATO, WOTH, BCCH, BTNW, TUTI, NOCA, REVI, AMCR), and boxes of the other 40 species and boxes that cross an excerpt edge are left out.

The model_training block turns on training and writeback. The torchvision-detect trainer is chosen on the /admin/training page and fine-tunes a Faster R-CNN on the confirmed spectrogram boxes. The trainer learns box positions and species labels, and predictions are written only onto excerpts outside the training split. The dataset's boxes sit in the same predictions field, so a prediction at or above the confidence floor replaces the loaded boxes on such an excerpt. Ten excerpts are enough to show the loop and not enough to train a useful detector.

Boxes
16,052
Species
48
Audio
385 minutes
Segment length
5 minutes, 32 kHz
License
CC0 1.0

Configuration File

This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.

yaml
# yaml-language-server: $schema=https://potatoannotator.readthedocs.io/en/latest/schemas/potato-config.schema.json
# Powdermill bird soundscapes: species boxes on a spectrogram.
#
# Dataset: "An annotated set of audio recordings of Eastern North American
#   birds containing frequency, time, and species information"
#   (Chronister, Rhinehart, Place, and Kitzes; 16,052 boxes, 48 species,
#   385 minutes of dawn chorus recorded at Powdermill Nature Reserve, PA).
# Paper:   Ecology 102(6), e03329, 2021. DOI: 10.1002/ecy.3329
#   @article{Chronister_2021,
#     title   = {An annotated set of audio recordings of Eastern North American
#                birds containing frequency, time, and species information},
#     volume  = {102}, number = {6}, journal = {Ecology}, publisher = {Wiley},
#     author  = {Chronister, Lauren M. and Rhinehart, Tessa A. and Place, Aidan
#                and Kitzes, Justin},
#     year    = {2021}, month = may, DOI = {10.1002/ecy.3329}}
# Data:    https://zenodo.org/records/4656848
#   (Dryad DOI 10.5061/dryad.d2547d81z), CC0 1.0. The 10-second MP3 excerpts
#   in media/ are cut from the dataset's own MP3 files and are real.
#
# Protocol, quoted from the dataset README:
#   "Annotation involved drawing boxes on spectrograms to obtain the time and
#   frequency intervals of each bird sound and then identifying the species."
#   "Aidan Place was then given the boxed spectrograms without species identity
#   and directed to make independent identifications and flag any time/frequency
#   box issues."
#   "Last, Tessa Rhinehart was given the annotations by LC and AP to settle
#   discrepancies."
#   "All vocalizations that were not short "chips" and could be identified were
#   annotated."
# Each box carries Begin Time (s), End Time (s), Low Freq (Hz), High Freq (Hz)
# and a Species column in standard banding alpha code format.
#
# Label glossary (alpha code, common name, from the README):
#   EATO Eastern towhee, WOTH Wood thrush, BCCH Black-capped chickadee,
#   BTNW Black-throated green warbler, TUTI Tufted titmouse,
#   NOCA Northern cardinal, REVI Red-eyed vireo, AMCR American crow.
#
# Adaptations:
#   - The original set has 48 species. This design keeps the eight with the
#     most boxes in the full tables (EATO 5,238; WOTH 1,826; BCCH 1,262;
#     BTNW 1,058; TUTI 885; NOCA 884; REVI 592; AMCR 534). Boxes of the other
#     40 species are left out of the sample data.
#   - Items are ten 10-second excerpts of five-minute segments from Recordings
#     1, 2 and 4, each re-encoded as 64 kbps mono MP3. Box times are shifted to
#     the excerpt start. Boxes that cross an excerpt edge are dropped.
#   - The dataset's final boxes are loaded as pre-annotations, so annotators
#     check and correct them. The original workflow was three passes (draw and
#     identify, blind re-identification, adjudication) in Raven Pro.
#
# Run from this folder:
#   potato start config.yaml -p 8000
#
# Training (optional). The torchvision-detect trainer fine-tunes a Faster R-CNN
# on spectrogram boxes (needs `pip install 'potato-annotation[train-vision]'`).
# It learns box positions and species labels from the boxes annotators have
# confirmed. Potato writes predictions only onto items outside the training
# split, into the item's "predictions" field. The dataset's boxes are loaded
# into that same field for every excerpt, so on an excerpt the model did not
# train on, a prediction at or above min_confidence replaces the loaded boxes
# for the calls scheme. Excerpts the model trained on keep no model boxes.
# It does not serve or deploy the model. Open /admin/training with the key
# below, pick torchvision-detect and the calls scheme, and click Train now.
# Ten excerpts are a demonstration, not enough to train a useful detector.
port: 8000
annotation_task_name: "Powdermill bird soundscapes: species boxes"
task_dir: "."
output_annotation_dir: "annotation_output"
export_annotation_format: raven
data_files:
  - "sample-data.json"
item_properties:
  id_key: id
  text_key: recording

require_password: false
admin_api_key: "demo-admin-key"

user_config:
  allow_all_users: true
  users: []

instance_display:
  fields:
    - key: recording
      type: text
      label: Excerpt

pre_annotation:
  enabled: true
  field: predictions
  allow_modification: true

annotation_schemes:
  - annotation_type: spectrogram_annotation
    name: calls
    description: "Check the boxes loaded from the dataset's Raven selection tables. Move, resize, relabel or delete them, and draw any call that was missed."
    source_field: audio_url
    labels:
      - name: EATO
        color: "#2563eb"
      - name: WOTH
        color: "#dc2626"
      - name: BCCH
        color: "#16a34a"
      - name: BTNW
        color: "#d97706"
      - name: TUTI
        color: "#9333ea"
      - name: NOCA
        color: "#0891b2"
      - name: REVI
        color: "#db2777"
      - name: AMCR
        color: "#65a30d"
    instructions: "Drag on the spectrogram to draw a box around one bird sound, covering its time and frequency span. Drag a box to move it and its corners to resize it. Pick the species alpha code with the buttons or keys 1-8 (EATO Eastern towhee, WOTH Wood thrush, BCCH Black-capped chickadee, BTNW Black-throated green warbler, TUTI Tufted titmouse, NOCA Northern cardinal, REVI Red-eyed vireo, AMCR American crow). Short chips are not boxed."

annotation_instructions: "Review each ten-second dawn-chorus excerpt. Each box marks the time and frequency span of one bird sound and carries the species code. Fix wrong boxes and labels, and add any missed sound from the eight listed species."

model_training:
  enabled: true
  writeback:
    schemas: ["calls"]
    include_unlabeled: true
    min_confidence: 0.5

Sample Data

json
[
  {
    "id": "pdm_001",
    "recording": "Recording_1_Segment_06_000s.mp3",
    "source_segment": "Recording_1_Segment_06.wav",
    "offset_s": 0,
    "audio_url": "/media/Recording_1_Segment_06_000s.mp3",
    "predictions": {
      "calls": [
        {
          "start_s": 0,
          "end_s": 0.55,
          "low_hz": 2219.8,
          "high_hz": 4809.6,
          "label": "EATO",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 0.525,
          "end_s": 1.991,
          "low_hz": 1181.7,
          "high_hz": 2658.8,
          "label": "NOCA",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 1.998,
          "end_s": 3.375,
          "low_hz": 1181.7,
          "high_hz": 4890.9,
          "label": "WOTH",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 2.597,
          "end_s": 3.123,
          "low_hz": 2256.6,
          "high_hz": 3062.5,
          "label": "TUTI",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 4.984,
          "end_s": 6.566,
          "low_hz": 2002.3,
          "high_hz": 4825.2,
          "label": "EATO",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 5.1,
          "end_s": 6.198,
          "low_hz": 1353.9,
          "high_hz": 3191.4,
          "label": "WOTH",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 6.668,
          "end_s": 7.377,
          "low_hz": 1674.1,
          "high_hz": 4431.3,
          "label": "NOCA",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 7.043,
          "end_s": 8.214,
          "low_hz": 3159.2,
          "high_hz": 4416.4,
          "label": "BCCH",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 8.291,
          "end_s": 9.293,
          "low_hz": 2100.8,
          "high_hz": 3216.8,
          "label": "TUTI",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 8.796,
          "end_s": 9.968,
          "low_hz": 1280.2,
          "high_hz": 4726.7,
          "label": "WOTH",
          "source": "import",
          "import_format": "raven"
        }
      ]
    },
    "prediction_sources": {
      "calls": {
        "model": "dataset annotations (Raven selection table)"
      }
    }
  },
  {
    "id": "pdm_002",
    "recording": "Recording_1_Segment_23_280s.mp3",
    "source_segment": "Recording_1_Segment_23.wav",
    "offset_s": 280,
    "audio_url": "/media/Recording_1_Segment_23_280s.mp3",
    "predictions": {
      "calls": [
        {
          "start_s": 0.323,
          "end_s": 0.68,
          "low_hz": 4814.8,
          "high_hz": 9452.8,
          "label": "TUTI",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 0.829,
          "end_s": 1.716,
          "low_hz": 6033.3,
          "high_hz": 7232.1,
          "label": "BCCH",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 1.33,
          "end_s": 2.699,
          "low_hz": 2319,
          "high_hz": 5306.1,
          "label": "EATO",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 1.966,
          "end_s": 5.008,
          "low_hz": 1041.6,
          "high_hz": 1749.1,
          "label": "AMCR",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 2.535,
          "end_s": 2.882,
          "low_hz": 5581.3,
          "high_hz": 9040.1,
          "label": "TUTI",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 3.557,
          "end_s": 5.047,
          "low_hz": 4127,
          "high_hz": 7428.6,
          "label": "BTNW",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 3.663,
          "end_s": 4.917,
          "low_hz": 3989.4,
          "high_hz": 7330.3,
          "label": "BTNW",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 5.621,
          "end_s": 6.002,
          "low_hz": 5542,
          "high_hz": 9236.6,
          "label": "TUTI",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 5.687,
          "end_s": 7.929,
          "low_hz": 943.3,
          "high_hz": 1867,
          "label": "AMCR",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 6.603,
          "end_s": 7.027,
          "low_hz": 5994,
          "high_hz": 7802,
          "label": "BCCH",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 7.91,
          "end_s": 8.339,
          "low_hz": 4991.7,
          "high_hz": 9295.6,
          "label": "TUTI",
          "source": "import",
          "import_format": "raven"
        },
        {
          "start_s": 8.426,
          "end_s": 9.211,
          "low_hz": 904,
          "high_hz": 1749.1,
          "label": "AMCR",
          "source": "import",
          "import_format": "raven"
        }
      ]
    },
    "prediction_sources": {
      "calls": {
        "model": "dataset annotations (Raven selection table)"
      }
    }
  }
]

// ... and 8 more items

Dataset & paper

Chronister et al., Ecology 2021

Paper DOI
10.1002/ecy.3329
Dataset DOI
10.5061/dryad.d2547d81z

Citation (BibTeX)

bibtex
@article{Chronister_2021,
  title = {An annotated set of audio recordings of Eastern North American birds containing frequency, time, and species information},
  volume = {102},
  ISSN = {1939-9170},
  url = {http://dx.doi.org/10.1002/ecy.3329},
  DOI = {10.1002/ecy.3329},
  number = {6},
  journal = {Ecology},
  publisher = {Wiley},
  author = {Chronister, Lauren M. and Rhinehart, Tessa A. and Place, Aidan and Kitzes, Justin},
  year = {2021},
  month = may
}

Details

Annotation Types

spectrogram_annotation

Domain

bioacousticsecology

Use Cases

bird sound detectionsoundscape annotationspecies identification

Tags

powdermillchronisterbird soundsoundscapespectrogrambioacousticsravenpassive acoustic monitoring

Found an issue or want to improve this design?

Open an Issue(opens in a new tab)