Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework Ubuntu Installation Instructions #99

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 29 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,40 +119,45 @@ print(recording.detections)

For more examples and documentation, make sure to visit [pypi.org/project/birdnetlib/](https://pypi.org/project/birdnetlib/). For any feature request or questions regarding <b>birdnetlib</b>, please contact [Joe Weiss](mailto:joe.weiss@gmail.com) or add an issue or PR at [github.com/joeweiss/birdnetlib](https://github.com/joeweiss/birdnetlib).

## Setup (Ubuntu)
## Setup (Ubuntu 20.04)

Install Python 3:
Clone the repository:

```
sudo apt-get update
sudo apt-get install python3-dev python3-pip
pip3 install --upgrade pip
git clone https://github.com/kahst/BirdNET-Analyzer.git
cd BirdNET-Analyzer
```

Install TFLite runtime (recommended) or Tensorflow (has to be 2.5 or later):
Install operating system packages:

```
pip3 install tflite-runtime
sudo apt update
sudo apt install --yes python3.8-dev python3.8 python3.8-venv ffmpeg
```

OR
Create a virtual environment with packaging tools:

pip3 install tensorflow
```
python3.8 -m venv venv
venv/bin/python -m pip install --upgrade pip setuptools wheel
```

Install Librosa to handle audio files:
Install TFLite runtime (recommended) or Tensorflow (has to be 2.5 or later) and librosa to handle audio files:

Either:

```
pip3 install librosa resampy
sudo apt-get install ffmpeg
venv/bin/python -m pip install tflite-runtime librosa nvidia-cudnn-cu12 resampy
```

Clone the repository
Or:

```
git clone https://github.com/kahst/BirdNET-Analyzer.git
cd BirdNET-Analyzer
venv/bin/python -m pip install tensorflow librosa nvidia-cudnn-cu12 resampy
```

> NOTE: `nvidia-cudnn-cu11` works under Linux and with Nvidia GPUs, only.

## Setup (Windows)

Before you attempt to setup BirdNET-Analyzer on your Windows machine, please consider downloading our fully-packaged version that does not require you to install any additional packages and can be run "as-is".
Expand Down Expand Up @@ -296,8 +301,16 @@ python analyze.py

2. Run `analyzer.py` to analyze an audio file. You need to set paths for the audio file and selection table output. Here is an example:

Under Linux and macOS:

```
venv/bin/python analyze.py --i ./audios --o ./outputs
```

Under Windows:

```
python3 analyze.py --i /path/to/audio/folder --o /path/to/output/folder
venv/Scripts/python.exe analyze.py --i ./audios --o ./outputs
```

<b>NOTE</b>: Your custom species list has to be named 'species_list.txt' and the folder containing the list needs to be specified with `--slist /path/to/folder`. You can also specify the number of CPU threads that should be used for the analysis with `--threads <Integer>` (e.g., `--threads 16`). If you provide GPS coordinates with `--lat` and `--lon`, the custom species list argument will be ignored.
Expand Down