lrauch commited on
Commit
69ef6d1
·
verified ·
1 Parent(s): da9c2fc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -31
README.md CHANGED
@@ -12,38 +12,7 @@ tags:
12
  - **Paper:** [GADME](https://arxiv.org/abs/2403.10380)
13
  - **Point of Contact:** [Lukas Rauch](mailto:lukas.rauch@uni-kassel.de)
14
 
15
- ### Quick Use
16
- - We recommend to use our [intro notebook](https://github.com/DBD-research-group/BirdSet/blob/main/notebooks/tutorials/birdset-pipeline_tutorial.ipynb) in our code repository
17
- - The BirdSet Code package simplfies the data processing steps
18
- - For multi-label evaluation with a segment-based evaluation use the test_5s column for testing.
19
-
20
- We provide a very short example where no additional code is required. We load the first 5 seconds to quickly create an examplary training dataset.
21
- We recommend to start with HSN. It is a medium size dataset with a low number of overlaps within a segment.
22
-
23
- ```python
24
- from datasets import Audio
25
-
26
- dataset = load_dataset("DBD-research-group/BirdSet", "HSN")
27
-
28
- # slice example
29
- dataset["train"] = dataset["train"].select(range(500))
30
 
31
- # the dataset comes without an automatic Audio casting, this has to be enabled via huggingface
32
- # this means that each time a sample is called, it is decoded (which may take a while if done for the complete dataset)
33
- # in BirdSet, this is all done on-the-fly during training and testing (since the dataset size would be too big if mapping and saving it only once)
34
- dataset = dataset.cast_column("audio", Audio(sampling_rate=32_000))
35
-
36
- # extract the first five seconds of each sample in training (not utilizing event detection)
37
- # this is not very efficient since each complete audio file must be decoded this way.
38
- # a custom decoding with soundfile, stating start and end would be more efficient (see BirdSet Code)
39
- def map_first_five(sample):
40
- max_length = 160_000 # 32_000hz*5sec
41
- sample["audio"]["array"] = sample["audio"]["array"][:max_length]
42
- return example
43
-
44
- # train is now available as an array that can be transformed into a spectrogram for example
45
- train = train.map(map_first_five, batch_size=1000, num_proc=2)
46
- ```
47
  ### Datasets
48
  We present the BirdSet benchmark that covers a comprehensive range of (multi-label and multi-class) classification datasets in avian bioacoustics.
49
  We offer a static set of evaluation datasets and a varied collection of training datasets, enabling the application of diverse methodologies.
@@ -103,6 +72,38 @@ and a complementary paper (work in progress): https://arxiv.org/abs/2403.10380
103
  - We provide the full recording with the complete label set and specified bounding boxes.
104
  - This dataset excludes recordings that do not contain bird calls ("no_call").
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
  ### Metadata
108
 
 
12
  - **Paper:** [GADME](https://arxiv.org/abs/2403.10380)
13
  - **Point of Contact:** [Lukas Rauch](mailto:lukas.rauch@uni-kassel.de)
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ### Datasets
17
  We present the BirdSet benchmark that covers a comprehensive range of (multi-label and multi-class) classification datasets in avian bioacoustics.
18
  We offer a static set of evaluation datasets and a varied collection of training datasets, enabling the application of diverse methodologies.
 
72
  - We provide the full recording with the complete label set and specified bounding boxes.
73
  - This dataset excludes recordings that do not contain bird calls ("no_call").
74
 
75
+ ### How to
76
+ - We recommend to use our [intro notebook](https://github.com/DBD-research-group/BirdSet/blob/main/notebooks/tutorials/birdset-pipeline_tutorial.ipynb) in our code repository
77
+ - The BirdSet Code package simplfies the data processing steps
78
+ - For multi-label evaluation with a segment-based evaluation use the test_5s column for testing.
79
+
80
+ We provide a very short example where no additional code is required. We load the first 5 seconds to quickly create an examplary training dataset.
81
+ We recommend to start with HSN. It is a medium size dataset with a low number of overlaps within a segment.
82
+
83
+ ```python
84
+ from datasets import Audio
85
+
86
+ dataset = load_dataset("DBD-research-group/BirdSet", "HSN")
87
+
88
+ # slice example
89
+ dataset["train"] = dataset["train"].select(range(500))
90
+
91
+ # the dataset comes without an automatic Audio casting, this has to be enabled via huggingface
92
+ # this means that each time a sample is called, it is decoded (which may take a while if done for the complete dataset)
93
+ # in BirdSet, this is all done on-the-fly during training and testing (since the dataset size would be too big if mapping and saving it only once)
94
+ dataset = dataset.cast_column("audio", Audio(sampling_rate=32_000))
95
+
96
+ # extract the first five seconds of each sample in training (not utilizing event detection)
97
+ # this is not very efficient since each complete audio file must be decoded this way.
98
+ # a custom decoding with soundfile, stating start and end would be more efficient (see BirdSet Code)
99
+ def map_first_five(sample):
100
+ max_length = 160_000 # 32_000hz*5sec
101
+ sample["audio"]["array"] = sample["audio"]["array"][:max_length]
102
+ return example
103
+
104
+ # train is now available as an array that can be transformed into a spectrogram for example
105
+ train = train.map(map_first_five, batch_size=1000, num_proc=2)
106
+ ```
107
 
108
  ### Metadata
109