bacpipe.model_pipelines.feature_extractors.insect66

Classes

Model(**kwargs)

ModelBaseClass(sr, segment_length, model_name)

SimpleNamespace

A simple attribute-based namespace.

SpectrogramCNN(cfg[, init_backbone])

class bacpipe.model_pipelines.feature_extractors.insect66.Model(**kwargs)[source]

Bases: ModelBaseClass

preprocess(audio)[source]
class bacpipe.model_pipelines.feature_extractors.insect66.SpectrogramCNN(cfg, init_backbone=True)[source]

Bases: Module

__init__(cfg, init_backbone=True)[source]

Pytorch network class containing the transformation from waveform to mel spectrogram, as well as the forward pass through a CNN backbone.

Data augmentation like mixup or masked frequency or time can also be applied here.

Parameters:
  • cfg (SimpleNameSpace containing all configurations)

  • init_backbone (bool (Default=True). Whether to download and initialize the backbone.) – Not always necessary when debugging.