Oisin Mac Aodha commited on
Commit
d5230e1
1 Parent(s): 9ace58a

change readme

Browse files
Files changed (1) hide show
  1. README.md +12 -74
README.md CHANGED
@@ -1,75 +1,13 @@
1
- # BatDetect2
2
- <img align="left" width="64" height="64" src="ims/bat_icon.png">
 
 
 
 
 
 
 
 
 
 
3
 
4
- Code for detecting and classifying bat echolocation calls in high frequency audio recordings.
5
-
6
-
7
- ### Getting started
8
- 1) Install the Anaconda Python 3.10 distribution for your operating system from [here](https://www.continuum.io/downloads).
9
- 2) Download this code from the repository (by clicking on the green button on top right) and unzip it.
10
- 3) Create a new environment and install the required packages:
11
- `conda create -y --name batdetect2 python==3.10`
12
- `conda activate batdetect2`
13
- `conda install --file requirements.txt`
14
-
15
-
16
- ### Try the model
17
- Click [here](https://colab.research.google.com/github/macaodha/batdetect2/blob/master/batdetect2_notebook.ipynb) to run the model using Google Colab. You can also run this notebook locally.
18
-
19
-
20
- ### Running the model on your own data
21
- After following the above steps to install the code you can run the model on your own data by opening the command line where the code is located and typing:
22
- `python run_batdetect.py AUDIO_DIR ANN_DIR DETECTION_THRESHOLD`
23
- e.g.
24
- `python run_batdetect.py example_data/audio/ example_data/anns/ 0.3`
25
-
26
-
27
- `AUDIO_DIR` is the path on your computer to the audio wav files of interest.
28
- `ANN_DIR` is the path on your computer where the model predictions will be saved. The model will output both `.csv` and `.json` results for each audio file.
29
- `DETECTION_THRESHOLD` is a number between 0 and 1 specifying the cut-off threshold applied to the calls. A smaller number will result in more calls detected, but with the chance of introducing more mistakes.
30
-
31
- There are also optional arguments, e.g. you can request that the model outputs features (i.e. estimated call parameters) such as duration, max_frequency, etc. by setting the flag `--spec_features`. These will be saved as `*_spec_features.csv` files:
32
- `python run_batdetect.py example_data/audio/ example_data/anns/ 0.3 --spec_features`
33
-
34
- You can also specify which model to use by setting the `--model_path` argument. If not specified, it will default to using a model trained on UK data e.g.
35
- `python run_batdetect.py example_data/audio/ example_data/anns/ 0.3 --model_path models/Net2DFast_UK_same.pth.tar`
36
-
37
-
38
- ### Training the model on your own data
39
- Take a look at the steps outlined in fintuning readme [here](bat_detect/finetune/readme.md) for a description of how to train your own model.
40
-
41
-
42
- ### Data and annotations
43
- The raw audio data and annotations used to train the models in the paper will be added soon.
44
- The audio interface used to annotate audio data for training and evaluation is available [here](https://github.com/macaodha/batdetect2_GUI).
45
-
46
-
47
- ### Warning
48
- The models developed and shared as part of this repository should be used with caution.
49
- While they have been evaluated on held out audio data, great care should be taken when using the model outputs for any form of biodiversity assessment.
50
- Your data may differ, and as a result it is very strongly recommended that you validate the model first using data with known species to ensure that the outputs can be trusted.
51
-
52
-
53
- ### FAQ
54
- For more information please consult our [FAQ](faq.md).
55
-
56
-
57
- ### Reference
58
- If you find our work useful in your research please consider citing our paper which you can find [here](https://www.biorxiv.org/content/10.1101/2022.12.14.520490v1):
59
- ```
60
- @article{batdetect2_2022,
61
- title = {Towards a General Approach for Bat Echolocation Detection and Classification},
62
- author = {Mac Aodha, Oisin and Mart\'{i}nez Balvanera, Santiago and Damstra, Elise and Cooke, Martyn and Eichinski, Philip and Browning, Ella and Barataudm, Michel and Boughey, Katherine and Coles, Roger and Giacomini, Giada and MacSwiney G., M. Cristina and K. Obrist, Martin and Parsons, Stuart and Sattler, Thomas and Jones, Kate E.},
63
- journal = {bioRxiv},
64
- year = {2022}
65
- }
66
- ```
67
-
68
- ### Acknowledgements
69
- Thanks to all the contributors who spent time collecting and annotating audio data.
70
-
71
-
72
- ### TODOs
73
- - [x] Release the code and pretrained model
74
- - [ ] Release the datasets and annotations used the experiments in the paper
75
- - [ ] Add the scripts used to generate the tables and figures from the paper
1
+ ---
2
+ title: Batdetect2
3
+ emoji: 🔥
4
+ colorFrom: gray
5
+ colorTo: yellow
6
+ sdk: gradio
7
+ sdk_version: 3.14.0
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13