macaodha / batdetect2

Other
48 stars 9 forks source link

Merging the Python API #4

Closed mbsantiago closed 1 year ago

mbsantiago commented 1 year ago

Hi @macaodha!

This pull request includes the new Python API for batdetect2 and the files required to package batdetect2.

Here is a summary of changes:

  1. Formatted all code with black and isort.
  2. Created an bat_detect.api module with documentation to ease integration of batdetect2 into custom pipelines.
  3. Created a bat_detect.cli module that exposes CLI commands for detection, and in the near future training and evaluation.
  4. Added a pyproject.toml file with the project metadata so that we can upload this package to pypi.
  5. Added integration tests in a tests folder to check that the api and the cli are working as expected, and created a GitHub actions to run the test in multiple Python versions.
  6. Created a bat_detect.types module to store common type definitions. This is helpful for editor support and to standardize some important interfaces.

There are other minor modifications to other modules that should not modify or break past behavior. Please let me know if you think something needs redesign or better documentation. Happy to polish it further.

Cheers, Santiago

kdarras commented 1 year ago

Excellent news! We are planning to integrate this into https://github.com/ecomontec/ecoSound-web , where we are already running BirdNET.

macaodha commented 1 year ago

Cool.

Note, we don't have full coverage of European species, only UK ones at the moment. However, if there is open-source data with ground truth annotations that you would be interested in submitting, we would be happy to chat.

kdarras commented 1 year ago

Hi, what would be the requirements of the ground truth data, apart from being open-source?

macaodha commented 1 year ago

Hi. We would need to annotate it to mark the location of each echolocation call in each file.