A Python computer vision library for animal behavior
Project description
Birdwatcher is a Python computer vision library for analyzing animal behavior in a Python scientific computing environment.
Birdwatcher should help you getting up and running quickly when building analysis code or tools for specific measurements. It provides functionality that is common in video analysis, such as reading and writing videos into and from numpy arrays, applying processing algorithms such as background subtraction, morphological transformation, resizing, drawing on frames etc. Much of the underlying video and image processing is based on FFmpeg and OpenCV, but Birdwatcher is easier to use for many tasks because its higher-level implementation of functionality.
In addition to video analysis tools, Birdwatcher has high-level functions for behavioral analysis based on such tools, although currently these are limited to movement/location detection of single animals.
Despite its name, Birdwatcher is not only for birds. We also successfully analyzed dog behavior, and it could be used on anything that moves. It is being used in our lab but still under heavy development, and should be considered alpha software.
Code can be found on GitHub: https://github.com/gbeckers/Birdwatcher .
Example notebooks are currently the best introduction on how to use Birdwatcher. See jupyter notebook directory.
Documentation can be found at https://birdwatcher.readthedocs.io .
It is developed by Gabriel Beckers and Carien Mol, at Experimental Psychology, Utrecht University. It is open source, freely available under the New BSD License terms.
Installation Birdwatcher package
Birdwatcher officially supports Python 3.13 or higher, but older Python 3 versions may also work.
User installation
We recommend using Anaconda for installation. Install Anaconda from https://www.anaconda.com/ .
Open Anaconda prompt in terminal.
Create new environment for Birdwatcher (name is up to you, in example here ‘mybirdwatcher’). We install Jupyter lab and ffmpeg at the same time:
$ conda create -n mybirdwatcher python=3.12 jupyterlab ffmpeg=4.2.2 gitSwitch to this new environment:
$ conda activate mybirdwatcherInstall Birdwatcher:
Stable latest official release from PyPi:
$ pip install BirdwatcherIf instead you want the latest version of the git master branch from, use:
$ pip install git+https://github.com/gbeckers/birdwatcher@master
Dependencies
The following dependencies are automatically taken care of when you install Birdwatcher using the pip method above:
numpy
pandas
matplotlib
seaborn
darr
opencv-python
opencv-contrib-python
It further depends on:
ffmpeg (including ffprobe)
If you do not use the conda way above to install ffmpeg, you need to install it yourself (https://www.ffmpeg.org/).
Run notebooks tutorial
To quickly learn the fundamentals of Birdwatcher, please walk through our notebooks. First, you need to download the notebooks and example videos from github. Then, navigate to the directory of the notebooks and activate the ‘mybirdwatcher’ environment. Type jupyter lab which opens in your browser. You can now open the notebooks and run the tutorial.
Test
To run the test suite:
>>>import birdwatcher as bw
>>>bw.test()
..................................................
----------------------------------------------------------------------
Ran 50 tests in 75.858s
OK
<unittest.runner.TextTestResult run=50 errors=0 failures=0>
Documentation
Examples
Contributions
Sita ter Haar and Dylan Minekus helped exploring the application of movement detection algorithms.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file birdwatcher-0.5.0.tar.gz.
File metadata
- Download URL: birdwatcher-0.5.0.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2d2cb1d0e60e62edcd14141174c6bee82fa3cab4ba6a62da388d04e2a77f2d8
|
|
| MD5 |
7107b6058cd90481ee4f130cf699b40c
|
|
| BLAKE2b-256 |
4c9f8be37c27ece234e82b4700d2c69239891f0cdb44188272842d818c5233b1
|
File details
Details for the file birdwatcher-0.5.0-py3-none-any.whl.
File metadata
- Download URL: birdwatcher-0.5.0-py3-none-any.whl
- Upload date:
- Size: 5.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2184beb020ad30db7bb12882f329b96351c3bb5c2725549eaac454992677f3bd
|
|
| MD5 |
16042f837bff15486c6e13e8b393424d
|
|
| BLAKE2b-256 |
c7fd6e3e38c26d427138a39839029ef64e927db378b8190e224280a2d9d62d10
|