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 the whole project #143

Open
wants to merge 227 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
227 commits
Select commit Hold shift + click to select a range
cf3ca4c
Add Docker ignores for faster and smaller builds
Bengt Jun 11, 2023
15af4f9
Rework Docker file
Bengt Jun 11, 2023
35c0b10
Rename line reading function
Bengt Jun 11, 2023
f48847f
Rename audio file opening function
Bengt Jun 11, 2023
044c667
Rename signal saving function
Bengt Jun 11, 2023
834789f
Rename noise creation function
Bengt Jun 11, 2023
816c0db
Rename signal splitting function
Bengt Jun 11, 2023
03bc497
Rename center cropping function
Bengt Jun 11, 2023
9af4104
Rename codes loading function
Bengt Jun 11, 2023
faade1d
Rename result file saving function
Bengt Jun 11, 2023
09d4019
Rename sorted timestamp getting function
Bengt Jun 11, 2023
61a1ef5
Rename raw audio from file getting function
Bengt Jun 11, 2023
a576daf
Rename file analyzing function
Bengt Jun 11, 2023
692e3af
rename request sending function
Bengt Jun 11, 2023
5b259b6
Rename result saving function
Bengt Jun 11, 2023
dfe3718
Reformat
Bengt Jun 11, 2023
31cc5d9
Rename config getting function
Bengt Jun 11, 2023
868a742
Rename config setting function
Bengt Jun 11, 2023
d0c334d
Rename error log writing function
Bengt Jun 11, 2023
f73d493
Rename as embeddings file saving function
Bengt Jun 11, 2023
105fcbf
Rename segment extraction wrapper function
Bengt Jun 11, 2023
3422cee
Rename single file analysis running function
Bengt Jun 11, 2023
9801e2f
Rename batch analysis running function
Bengt Jun 11, 2023
1210d4f
Rename analysis running function
Bengt Jun 11, 2023
2eb4dcc
Rename model loading function
Bengt Jun 11, 2023
ac02ed1
Rename custom classifier loading function
Bengt Jun 11, 2023
6975eed
Rename meta model loading function
Bengt Jun 11, 2023
8f81322
Rename liner classifier building function
Bengt Jun 11, 2023
c10cf6a
Rename linear classifier training function
Bengt Jun 11, 2023
ec3fe6e
Rename linear classifier saving function
Bengt Jun 11, 2023
2846a81
Rename linear filter prediction function
Bengt Jun 11, 2023
b15f6b9
Rename with custom classifier prediction function
Bengt Jun 11, 2023
19f1581
Rename embeddings extraction function
Bengt Jun 11, 2023
e9af101
Rename result file type detection function
Bengt Jun 11, 2023
dbb69c0
Rename folder parsing function
Bengt Jun 11, 2023
485e759
Rename file parsing function
Bengt Jun 11, 2023
be1a32c
Rename segment finding function
Bengt Jun 11, 2023
ecb3980
Rename segments extraction function
Bengt Jun 11, 2023
0744e90
Rename result pooling function
Bengt Jun 11, 2023
ea52aa8
Rename function of health checking endpoint
Bengt Jun 11, 2023
2ccb2f2
Rename analyze post request handling function
Bengt Jun 11, 2023
edf7c61
Rename species list getting function
Bengt Jun 11, 2023
54a2f7f
Rename training data loading function
Bengt Jun 11, 2023
e248b67
Rename model training function
Bengt Jun 11, 2023
7f575c3
Rename locale getting function
Bengt Jun 11, 2023
52f1673
Rename species names translation function
Bengt Jun 11, 2023
ce45e6b
Rework birdnetlib installation/usage instructions
Bengt Jun 11, 2023
853be17
Rework the Ubuntu installation instructions
Bengt Jun 11, 2023
f20a430
Add installation job
Bengt Jun 11, 2023
7e7372b
Rename error log clearing function
Bengt Jun 11, 2023
fded407
Rename error log
Bengt Jun 11, 2023
291ac53
Fix function call
Bengt Jun 11, 2023
52f9d0e
Fix function call
Bengt Jun 11, 2023
4430c3d
Pin the Python and Debian version in Dockerfile
Bengt Jun 11, 2023
37d5759
Fix pip commands
Bengt Jun 11, 2023
8e81fa2
Document freezing pip requirements
Bengt Jun 11, 2023
a06b0a0
Fix installation command
Bengt Jun 11, 2023
9ac9bd1
Add initial requirements files
Bengt Jun 11, 2023
8d4fed3
Require pytest
Bengt Jun 11, 2023
89fda6d
Use proper list type object from standard library
Bengt Jun 11, 2023
d4ffb96
Checkout the actual code
Bengt Jun 11, 2023
a42b05c
Checkout code first
Bengt Jun 11, 2023
dec3176
Freeze pytest to requirements
Bengt Jun 11, 2023
9c469e5
Introduce a birdnet python package
Bengt Jun 11, 2023
3f5e517
Test model training function in girdnet package
Bengt Jun 11, 2023
a8d49ba
Require tensorflow rougly for now
Bengt Jun 11, 2023
19623cd
Add test for training code
Bengt Jun 11, 2023
e629279
Add whitespace at EOF
Bengt Jun 11, 2023
e2edc0d
Set args manually in test
Bengt Jun 11, 2023
2405baa
Use a named tuple instead of a dictionary
Bengt Jun 11, 2023
a123401
Introduce and use a root path constant
Bengt Jun 11, 2023
0c9825b
Use example in train test
Bengt Jun 11, 2023
4ebe218
Rename, fix imports
Bengt Jun 11, 2023
2166dc7
Download training data
Bengt Jun 11, 2023
f5a1959
Ignore BirdNET training data in git
Bengt Jun 11, 2023
ae895a9
Import numpy without aliasing
Bengt Jun 11, 2023
ecba7e8
Fix function call
Bengt Jun 11, 2023
0dc935a
Freeze requriements
Bengt Jun 11, 2023
bccf111
Use BirdNET traning data
Bengt Jun 11, 2023
18d48b9
Ignore custom checkpoints in git
Bengt Jun 11, 2023
b59182a
Follow refactorings
Bengt Jun 11, 2023
994cf68
Introduce a segments package
Bengt Jun 11, 2023
5ad2389
Move train.py to train package
Bengt Jun 11, 2023
aeedc5f
Split segments module code into segments package
Bengt Jun 11, 2023
5336836
Use proper types for list
Bengt Jun 11, 2023
839a83a
Use proper type list and dictionary consistently
Bengt Jun 11, 2023
7627f4b
Shorten configuration to config, but not to cfg as a sensible compromise
Bengt Jun 11, 2023
3ee2d56
Fix imports
Bengt Jun 11, 2023
9c2b1ae
test segment extraction
Bengt Jun 11, 2023
a8a5b7a
Move result pooling function to its own module
Bengt Jun 11, 2023
90e5b23
Move model to model package
Bengt Jun 11, 2023
34facc8
Rename model module
Bengt Jun 11, 2023
5a20244
Move all code into the birdnet package
Bengt Jun 11, 2023
9ef998f
Split utillities module into multiple modules
Bengt Jun 11, 2023
32804b7
Rework utilities modules
Bengt Jun 11, 2023
02eb8e7
move audio utility functions into the package
Bengt Jun 11, 2023
ae89f3e
Rename function
Bengt Jun 11, 2023
824f220
Split analysis module into modules
Bengt Jun 11, 2023
f0c2857
Fix imports somewhat
Bengt Jun 11, 2023
b75d8ff
Fix imports more
Bengt Jun 11, 2023
b195305
Add an actual installation job
Bengt Jun 11, 2023
d8d43c9
Add an initial setup,py
Bengt Jun 11, 2023
b488572
Move audio files collection test
Bengt Jun 11, 2023
d5d1ae8
Reformat
Bengt Jun 11, 2023
db8843a
Fix line reading import
Bengt Jun 11, 2023
2f5b800
Refactor client
Bengt Jun 11, 2023
0cbc5b5
Add missing dependency from client application
Bengt Jun 11, 2023
c1c17d4
Add missing dependency from client application
Bengt Jun 11, 2023
4f572d8
Fix import
Bengt Jun 11, 2023
e642d81
Fix imports
Bengt Jun 11, 2023
2d4f9cd
Fix imports
Bengt Jun 11, 2023
80eaf30
Reorder imports
Bengt Jun 11, 2023
16c80a8
Fix import
Bengt Jun 11, 2023
54fa748
Fix import
Bengt Jun 11, 2023
e00bec0
Fix imports
Bengt Jun 11, 2023
b4e22fc
Fix imports
Bengt Jun 11, 2023
d1a692a
Reformat
Bengt Jun 11, 2023
a46fc61
Split audio module into package
Bengt Jun 11, 2023
1696084
Rename prediction functions to avoid conflicts
Bengt Jun 11, 2023
72a3ca4
Rename prediction functions to avoid conflicts
Bengt Jun 11, 2023
5836d0a
Clean up
Bengt Jun 11, 2023
764576f
Drop unused import
Bengt Jun 11, 2023
678705e
Fix imports
Bengt Jun 11, 2023
eb60495
Speed up training test
Bengt Jun 11, 2023
950492e
Introduce a paths module
Bengt Jun 11, 2023
81a6c3a
Drop unused import
Bengt Jun 11, 2023
e7f4c6a
Use root path constant
Bengt Jun 11, 2023
a269b88
Split embeddings module into package
Bengt Jun 11, 2023
457975a
Drop outdated comment
Bengt Jun 11, 2023
cdaa7dd
Document test requirements
Bengt Jun 11, 2023
c9b53e2
Remove spurious whitespace
Bengt Jun 12, 2023
fc5ac5e
Fix type hint
Bengt Jun 12, 2023
3fce983
Fix imports
Bengt Jun 12, 2023
786f1c5
Fix imports
Bengt Jun 12, 2023
a6e4da1
Fix imports
Bengt Jun 12, 2023
9abf3eb
Fix imports
Bengt Jun 12, 2023
c208f0a
Fix imports
Bengt Jun 12, 2023
1cbb15f
Speed up test
Bengt Jun 12, 2023
35b6ca2
Speed up test
Bengt Jun 12, 2023
d1c450b
Fix path
Bengt Jun 12, 2023
8e67aab
Fix imports
Bengt Jun 12, 2023
6dda839
Introduce an embedding test package
Bengt Jun 12, 2023
f814ea8
Test translations, too for the increased test coverage
Bengt Jun 12, 2023
6870b10
Split translations module into package
Bengt Jun 12, 2023
e3295f0
Fix typo
Bengt Jun 12, 2023
501f811
Fix import
Bengt Jun 12, 2023
838747b
Fix imports
Bengt Jun 12, 2023
ed096b6
Make directory a package
Bengt Jun 12, 2023
0ae1579
Fix more imports
Bengt Jun 12, 2023
9800df5
Require gradio
Bengt Jun 12, 2023
8ea0c2b
Fix imports
Bengt Jun 12, 2023
b660d23
Add test for species
Bengt Jun 12, 2023
bd3fc13
Reformat
Bengt Jun 12, 2023
9702871
Fix path handling to make species test work
Bengt Jul 2, 2023
37b0fa4
Use dictionary and list builtins instead of the deprecated types from…
Bengt Jul 3, 2023
0f209e7
Replace call to format with fstring
Bengt Jul 3, 2023
fafc4a3
Reformat
Bengt Jul 3, 2023
ef11bab
Replace call to format with fstring
Bengt Jul 3, 2023
0b7e2e1
Reformat
Bengt Jul 3, 2023
071b9d6
Reformat
Bengt Jul 3, 2023
dc29df9
Reformat
Bengt Jul 3, 2023
c757fbf
Reformat
Bengt Jul 3, 2023
f872b63
Reformat
Bengt Jul 3, 2023
7264edd
Reformat
Bengt Jul 3, 2023
143fc69
Reformat
Bengt Jul 3, 2023
930d1e9
Make all directories packages
Bengt Jul 3, 2023
f496116
Reformat
Bengt Jul 3, 2023
c56443a
Fix imports
Bengt Jul 3, 2023
27a42b5
Reformat
Bengt Jul 3, 2023
55f5323
Fix import
Bengt Jul 3, 2023
cbfd3eb
Upgrade workflows to Ubuntu 22.04 so that the imports for builtins work
Bengt Jul 3, 2023
3bd3adb
Document using Python 3.10
Bengt Jul 3, 2023
d46f761
Do not require pkg resources
Bengt Jul 3, 2023
b0785d4
Rebuild requirements for Python 3.10
Bengt Jul 3, 2023
4cad4dd
Use test requirements file
Bengt Jul 3, 2023
bdcda9d
Split requirements file into three
Bengt Jul 3, 2023
4452d06
Add test requirements
Bengt Jul 3, 2023
cd58d52
Document using requirement files
Bengt Jul 3, 2023
e76b943
Reduce reification in requirements files
Bengt Jul 16, 2023
4e29c28
Follow path renames
Bengt Jul 16, 2023
4647cf7
Simplify expression
Bengt Jul 22, 2023
afdd402
Fix imports
Bengt Jul 26, 2023
2dd28c1
Extend librosa hook to scipy and sklearn hidden imports
Bengt Jul 26, 2023
b4dd1ae
Add build requirements, pin librosa to the lastest version compatible…
Bengt Jul 26, 2023
c43f7c1
reformat
Bengt Jul 26, 2023
3544ac3
Fix names and paths
Bengt Jul 26, 2023
5208c42
Automate copying the dist directory to the build directory
Bengt Jul 26, 2023
8386231
Extend extra hooks to more libraries
Bengt Jul 26, 2023
1a74152
Document building the application using PyInstaller
Bengt Jul 26, 2023
67b6b7c
Reformat
Bengt Jul 26, 2023
4b7f8a1
Fix path
Bengt Jul 26, 2023
422766b
Remove now-unused paths from Docker ignores
Bengt Jul 26, 2023
066edc6
Fix many paths
Bengt Jul 26, 2023
94e9aeb
Add build jobs to CI
Bengt Jul 26, 2023
829a70e
Install build requirements
Bengt Jul 26, 2023
7b0db1e
Install gobject-introspection under macOS
Bengt Jul 26, 2023
41d28eb
Use gvsbuild to build required GTK libraries
Bengt Jul 26, 2023
4d7cbb1
Add build targets for analyzer
Bengt Jul 26, 2023
fa765fd
Package a Python distribution for release on PyPI
Bengt Jul 26, 2023
2aa2c24
Activate environment for gvsbuild
Bengt Jul 26, 2023
83ffc00
Activate environment before installing gvsbuild
Bengt Jul 26, 2023
2cf5044
Try installing gvsbuild from PyPI
Bengt Jul 26, 2023
56a4451
Try installing pipx and gvsbuild user-wide
Bengt Jul 26, 2023
2bdffe7
Build gobject introspection last
Bengt Jul 27, 2023
eae09ef
Configure pipx home and bin dirs
Bengt Jul 27, 2023
54459ee
Try installing gvsbuild from source again
Bengt Jul 27, 2023
9a34dcb
Rename jobs
Bengt Jul 27, 2023
d288c4e
Add windows qt attempt
Bengt Jul 27, 2023
d0004d2
Differentiate between gtk and qt versions
Bengt Jul 27, 2023
2aeb8a2
Remove gtk requirements from runtime input file
Bengt Jul 27, 2023
3c345f4
Store artifacts in all jobs, use Qt under Windows, as that seems to work
Bengt Jul 27, 2023
77fad85
try not installing vctools as that takes quite some time
Bengt Jul 27, 2023
1f0f624
Use name in build artifact step
Bengt Jul 27, 2023
b2c8bef
Use artifact upload action
Bengt Jul 27, 2023
b0abef0
Add jobs for building qt versions under linux and macOS, too
Bengt Jul 27, 2023
aeed517
Differentiate artifacts so that they do not get overwritten
Bengt Jul 27, 2023
6858cce
Copy dist to build for analyse, too
Bengt Jul 27, 2023
8829c35
Fix name
Bengt Jul 27, 2023
b72474c
Build one file executables
Bengt Jul 27, 2023
31a5d97
Do not copy when onefile is used
Bengt Jul 27, 2023
62c1464
Use root path to resolve relative paths
Bengt Aug 10, 2023
299a068
Use root path to resolve relative paths
Bengt Aug 10, 2023
b8b1869
Use root path to resolve relative paths
Bengt Aug 10, 2023
403d2ad
Fix function call
Bengt Aug 10, 2023
5dd0854
Use root path to resolve relative paths
Bengt Aug 10, 2023
f0a3c70
Reformat to understand the content, introduce name to document it
Bengt Aug 10, 2023
d4a9327
Fix model path
Bengt Aug 15, 2023
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
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*

!/eBird_taxonomy_codes_2021E.json
!checkpoints/V2.3/BirdNET_GLOBAL_3K_V2.3_Labels.txt
!checkpoints/V2.3/BirdNET_GLOBAL_3K_V2.3_Model_FP32.tflite
!/example/
197 changes: 197 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
on: [push]
jobs:
setup:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: python3.10 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --no-cache-dir -r requirements.d/test.txt

setup-and-test:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: python3.10 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --no-cache-dir -r requirements.d/test.txt
- run: wget https://github.com/Bengt/BirdNET-Training-Data/archive/refs/heads/main.zip
- run: unzip main.zip
- run: rm -rf main.zip
- run: venv/bin/python -m pytest tests

install:
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: python3.10 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --no-cache-dir -r requirements.d/test.txt
- run: venv/bin/python -m pip install -e .

build-analyze-linux-gtk:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: python3.10 --version
- run: sudo apt-get update
- run: sudo apt-get install --yes ffmpeg libgirepository1.0-dev
- run: python3.10 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --upgrade -r requirements.d/build_gtk.in
- run: venv/bin/python pyinstaller_analyze.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-Analyze-Linux-GTK
path: build
retention-days: 90

build-analyze-linux-qt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: python3.10 --version
- run: sudo apt-get update
- run: sudo apt-get install --yes ffmpeg
- run: python3.10 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --upgrade -r requirements.d/build_qt.in
- run: venv/bin/python pyinstaller_analyze.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-Analyze-Linux-Qt
path: build
retention-days: 90

build-analyze-macos-gtk:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- run: python3.11 --version
- run: brew install ffmpeg cairo pkg-config gobject-introspection
- run: python3.11 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --upgrade -r requirements.d/build_gtk.in
- run: venv/bin/python pyinstaller_analyze.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-Analyze-macOS-GTK
path: build
retention-days: 90

build-analyze-macos-qt:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- run: python3.11 --version
- run: brew install ffmpeg
- run: python3.11 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --upgrade -r requirements.d/build_qt.in
- run: venv/bin/python pyinstaller_analyze.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-Analyze-macOS-Qt
path: build
retention-days: 90

build-analyze-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- run: python3 --version
- run: choco install ffmpeg visualstudio2022-workload-vctools
- run: python3 -m venv venv
- run: venv\Scripts\python.exe -m pip install --upgrade pip setuptools wheel
- run: venv\Scripts\python.exe -m pip install --upgrade -r requirements.d/build_qt.in
- run: venv\Scripts\python.exe pyinstaller_analyze.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-Analyze-Windows-Qt
path: build
retention-days: 90

build-gui-linux-gtk:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: python3.10 --version
- run: sudo apt-get update
- run: sudo apt-get install --yes ffmpeg libgirepository1.0-dev
- run: python3.10 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --upgrade -r requirements.d/build_gtk.in
- run: venv/bin/python pyinstaller_gui.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-GUI-Linux-GTK
path: build
retention-days: 90

build-gui-linux-qt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: python3.10 --version
- run: sudo apt-get update
- run: sudo apt-get install --yes ffmpeg
- run: python3.10 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --upgrade -r requirements.d/build_qt.in
- run: venv/bin/python pyinstaller_gui.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-GUI-Linux-Qt
path: build
retention-days: 90

build-gui-macos-gtk:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- run: python3.11 --version
- run: brew install ffmpeg cairo pkg-config gobject-introspection
- run: python3.11 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --upgrade -r requirements.d/build_gtk.in
- run: venv/bin/python pyinstaller_gui.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-GUI-macOS-GTK
path: build
retention-days: 90

build-gui-macos-qt:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- run: python3.11 --version
- run: brew install ffmpeg
- run: python3.11 -m venv venv
- run: venv/bin/python -m pip install --upgrade pip setuptools wheel
- run: venv/bin/python -m pip install --upgrade -r requirements.d/build_qt.in
- run: venv/bin/python pyinstaller_gui.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-GUI-macOS-Qt
path: build
retention-days: 90

build-gui-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- run: python3 --version
- run: choco install ffmpeg
- run: python3 -m venv venv
- run: venv\Scripts\python.exe -m pip install --upgrade pip setuptools wheel
- run: venv\Scripts\python.exe -m pip install --upgrade -r requirements.d/build_qt.in
- run: venv\Scripts\python.exe pyinstaller_gui.py
- uses: actions/upload-artifact@v3
with:
name: BirdNET-GUI-Windows-Qt
path: build
retention-days: 90
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,6 @@ dmypy.json

# Pyre type checker
.pyre/

BirdNET-Training-Data-main
checkpoints/custom
2 changes: 1 addition & 1 deletion BirdNET-Analyzer-full.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ block_cipher = None


analyzer = Analysis(
['analyze.py'],
['birdnet/analysis/main.py'],
pathex=[],
binaries=[],
datas=[('eBird_taxonomy_codes_2021E.json', '.'), ('checkpoints', 'checkpoints'), ('example/soundscape.wav', 'example'), ('example/species_list.txt', 'example'), ('labels', 'labels')],
Expand Down
37 changes: 26 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
# Build from Python 3.8 slim
FROM python:3.9-slim
FROM python:3.9.17-slim-bullseye

# Install required packages while keeping the image small
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
# Install required Debian packages
RUN \
apt-get update && \
apt-get install --yes --no-install-recommends \
ffmpeg \
&& \
rm -rf /var/lib/apt/lists/*

# Install required Python packages
RUN pip3 install numpy scipy librosa bottle resampy
# Upgrade Python packaging tools
RUN \
pip3 install --no-cache-dir --upgrade \
pip \
setuptools \
wheel

# Install Tensforflow
RUN pip3 install tensorflow
# Install required Python packages
RUN \
pip3 install --no-cache-dir \
bottle \
librosa \
numpy \
scipy \
resampy \
tensorflow

# Import all scripts
COPY . ./
WORKDIR /BirdNET
COPY . .

# Add entry point to run the script
ENTRYPOINT [ "python3" ]
CMD [ "analyze.py" ]
CMD [ "birdnet/analysis/main.py" ]
Loading