diff --git a/README.md b/README.md index d6c74d79..c6f82a7f 100644 --- a/README.md +++ b/README.md @@ -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 birdnetlib, 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". @@ -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 ``` NOTE: 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 ` (e.g., `--threads 16`). If you provide GPS coordinates with `--lat` and `--lon`, the custom species list argument will be ignored.