Network Training & Testing

Once your data are annotated and reviewed, you can train a deep learning network to find those calls for you. This section walks through the full process, from turning your annotations into training images to running a finished network on new audio. The architectures, settings, and performance metrics referred to throughout are explained in Architectures, Hyperparameters & Metrics.


The Workflow

  1. Creating Training Images: convert your annotated audio into spectrogram images, each paired with the bounding boxes of the calls it contains. The spectrogram and image settings you choose here have a large effect on how well the network performs.

  2. Network Training: train a detection network on those images. You choose the base network (Tiny YOLO, CSP-DarkNet-53, or ResNet-50, which are pre-trained, or a blank ResNet-50 that is still being evaluated), the anchor boxes, and the training settings, and watch the training and validation loss as the network learns.

  3. Performance Testing: run the trained network on a separate, annotated test dataset and compare its detections with your annotations, using precision, recall, F1-score, average precision, mAP, and a confusion matrix.

  4. Network Deployment: use the network to detect calls in new audio, add the date and time to each detection, and export the detections to a Raven selection table.


Before You Start

  • Annotate thoroughly. DeepAcoustics adds noise examples automatically from the parts of your audio outside the annotation boxes, so every call of interest in an annotated file needs to be boxed. See Preparing Your Data and Annotation Review.
  • Keep test data separate. Set aside annotated audio that is not used for training, so performance testing shows how the network handles calls it has never seen.
  • Organize your folders. Decide where your training images, image tables, networks, and results will be saved before you start. The image table stores the location of every training image, so the images should not be moved afterward.
  • Keep track of your settings. You will likely train several networks with different settings before finding the one that works best. Recording the settings and test results for each network makes them easy to compare. The tutorial data includes a spreadsheet template for this.
TipTraining is an iterative process

There is rarely a single right set of settings. Start with a fast architecture such as Tiny YOLO, test the network, change one setting at a time, and compare the results. The Tutorial takes you through each of these steps with example data.